From 1e58f551bbfb6a8ef4d83292685d7c3672385c8b Mon Sep 17 00:00:00 2001 From: jussi Date: Tue, 9 May 2023 23:48:09 +0300 Subject: UnloadTexture did not set texture id to NULL. --- src/textures.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/textures.c') diff --git a/src/textures.c b/src/textures.c index 291a7ad..04cd9d5 100644 --- a/src/textures.c +++ b/src/textures.c @@ -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; -- cgit v1.2.3