summaryrefslogtreecommitdiff
path: root/src/textures.c
diff options
context:
space:
mode:
authorjussi2023-05-09 23:48:09 +0300
committerjussi2023-05-09 23:48:09 +0300
commit1e58f551bbfb6a8ef4d83292685d7c3672385c8b (patch)
treea4fbc3e1bf03c72c08ed398795997528f27fcb8f /src/textures.c
parent429a9dff96a5dbe1f526ae7cc6e41815eb862cf0 (diff)
downloadreilua-enhanced-1e58f551bbfb6a8ef4d83292685d7c3672385c8b.tar.gz
reilua-enhanced-1e58f551bbfb6a8ef4d83292685d7c3672385c8b.tar.bz2
reilua-enhanced-1e58f551bbfb6a8ef4d83292685d7c3672385c8b.zip
UnloadTexture did not set texture id to NULL.
Diffstat (limited to 'src/textures.c')
-rw-r--r--src/textures.c3
1 files changed, 1 insertions, 2 deletions
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;