fix inventory image texture leak
authorsapier <Sapier at GMX dot net>
Sun, 7 Apr 2013 17:47:34 +0000 (19:47 +0200)
committerkwolekr <kwolekr@minetest.net>
Mon, 8 Apr 2013 02:54:00 +0000 (22:54 -0400)
src/tile.cpp

index 80db32adb835468e4dabd912d302b2216c8311bb..3bfb4bb884dac075f075c80ed70eea2b35faf4b6 100644 (file)
@@ -1661,6 +1661,9 @@ bool generate_image(std::string part_of_name, video::IImage *& baseimg,
                        video::IImage *image = driver->createImage(rtt, v2s32(0,0), dim);
                        assert(image);
 
+                       //cleanup texture
+                       driver->removeTexture(rtt);
+
                        baseimg = driver->createImage(video::ECF_A8R8G8B8, dim);
 
                        if(image)