UnloadTexture did not set texture id to NULL.

This commit is contained in:
jussi
2023-05-09 23:48:09 +03:00
parent 429a9dff96
commit 1e58f551bb
5 changed files with 5 additions and 5 deletions

View File

@@ -111,6 +111,7 @@ void texturesFreeTexture( size_t id ) {
UnloadRenderTexture( state->textures[id]->renderTexture );
break;
}
state->textures[id] = NULL;
}
}
/*
@@ -1746,9 +1747,7 @@ int ltexturesUnloadTexture( lua_State *L ) {
lua_pushboolean( L, false );
return 1;
}
// UnloadTexture( *state->textures[ id ] );
texturesFreeTexture( texId );
// state->textures[ id ] = NULL;
lua_pushboolean( L, true );
return 1;