1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Revert "Don't leak textures all over the place"

This causes textures to be deleted before they are no longer accessed,
resulting in a segmentation fault. This needs to be rewritten in such a way
that textures are deleted when the client disconnects from a server.

This reverts commit 41c00e87d4.
This commit is contained in:
Perttu Ahola 2012-11-25 16:39:07 +02:00
parent bbd990f2cc
commit e02b95741b
2 changed files with 12 additions and 31 deletions

View file

@ -433,9 +433,6 @@ video::ITexture *generateTextureFromMesh(scene::IMesh *mesh,
}
// Create render target texture
video::ITexture *oldtexture = driver->findTexture(texture_name.c_str());
if(oldtexture)
driver->removeTexture(oldtexture);
video::ITexture *rtt = driver->addRenderTargetTexture(
dim, texture_name.c_str(), video::ECF_A8R8G8B8);
if(rtt == NULL)