summaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
authorjussi2024-05-29 22:44:36 +0300
committerjussi2024-05-29 22:44:36 +0300
commitf3dbe7d24bcf01d9a23326880dbb1a28457ff51f (patch)
tree1eb3ad7dc25d3be9f05d6e3443b451094fd7ac75 /src/core.c
parentcd8989376e03700669da08d98f62f04b0fea5462 (diff)
downloadreilua-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/core.c')
-rw-r--r--src/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core.c b/src/core.c
index d22ed60..2ff50e5 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1106,6 +1106,7 @@ int lcoreUnloadShader( lua_State* L ) {
Shader* shader = uluaGetShader( L, 1 );
UnloadShader( *shader );
+ memset( shader, 0, sizeof( Shader ) );
return 0;
}
@@ -2010,6 +2011,7 @@ int lcoreUnloadAutomationEventList( lua_State* L ) {
AutomationEventList* list = uluaGetAutomationEventList( L, 1 );
UnloadAutomationEventList( list );
+ memset( list, 0, sizeof( AutomationEventList ) );
return 0;
}
@@ -3479,6 +3481,7 @@ int lcoreUnloadBuffer( lua_State* L ) {
Buffer* buffer = uluaGetBuffer( L, 1 );
unloadBuffer( buffer );
+ memset( buffer, 0, sizeof( Buffer ) );
return 0;
}