mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/GabsPuNs-MinecraftConsoles.git
synced 2026-07-06 11:18:07 +00:00
@@ -1001,8 +1001,8 @@ void Textures::releaseTexture(int id)
|
||||
loadedImages.erase(id);
|
||||
// TextureFree() has no bounds check and crashes on stale IDs (e.g. after
|
||||
// RenderManager.Initialise() which memsets the texture table to zero).
|
||||
// TextureGetTexture() IS safe — returns nullptr for invalid/unallocated IDs.
|
||||
if (RenderManager.TextureGetTexture(id) != nullptr)
|
||||
// TextureGetTexture() IS safe — returns NULL for invalid/unallocated IDs.
|
||||
if (RenderManager.TextureGetTexture(id) != NULL)
|
||||
{
|
||||
glDeleteTextures(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user