From abe74ea5ea820403450725ee0ddcc44b07cbe098 Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 7 Apr 2013 19:47:34 +0200 Subject: [PATCH] fix inventory image texture leak --- src/tile.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tile.cpp b/src/tile.cpp index 80db32ad..3bfb4bb8 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -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) -- 2.30.2