diff options
| author | jussi | 2024-05-29 22:44:36 +0300 |
|---|---|---|
| committer | jussi | 2024-05-29 22:44:36 +0300 |
| commit | f3dbe7d24bcf01d9a23326880dbb1a28457ff51f (patch) | |
| tree | 1eb3ad7dc25d3be9f05d6e3443b451094fd7ac75 /src/audio.c | |
| parent | cd8989376e03700669da08d98f62f04b0fea5462 (diff) | |
| download | reilua-enhanced-f3dbe7d24bcf01d9a23326880dbb1a28457ff51f.tar.gz reilua-enhanced-f3dbe7d24bcf01d9a23326880dbb1a28457ff51f.tar.bz2 reilua-enhanced-f3dbe7d24bcf01d9a23326880dbb1a28457ff51f.zip | |
Unload functions clear object to 0 so they would not be ready in Is*Ready.
Diffstat (limited to 'src/audio.c')
| -rw-r--r-- | src/audio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/audio.c b/src/audio.c index 53031cd..fdffae5 100644 --- a/src/audio.c +++ b/src/audio.c @@ -212,6 +212,7 @@ int laudioUnloadWave( lua_State* L ) { Wave* wave = uluaGetWave( L, 1 ); UnloadWave( *wave ); + memset( wave, 0, sizeof( Wave ) ); return 0; } @@ -225,6 +226,7 @@ int laudioUnloadSound( lua_State* L ) { Sound* sound = uluaGetSound( L, 1 ); UnloadSound( *sound ); + memset( sound, 0, sizeof( Sound ) ); return 0; } @@ -238,6 +240,7 @@ int laudioUnloadSoundAlias( lua_State* L ) { Sound* alias = uluaGetSound( L, 1 ); UnloadSoundAlias( *alias ); + memset( alias, 0, sizeof( Sound ) ); return 0; } @@ -517,6 +520,7 @@ int laudioUnloadMusicStream( lua_State* L ) { Music* music = uluaGetMusic( L, 1 ); UnloadMusicStream( *music ); + memset( music, 0, sizeof( Music ) ); return 0; } |
