Unload functions clear object to 0 so they would not be ready in Is*Ready.

This commit is contained in:
jussi
2024-05-29 22:44:36 +03:00
parent cd8989376e
commit f3dbe7d24b
6 changed files with 17 additions and 0 deletions

View File

@@ -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;
}