summaryrefslogtreecommitdiff
path: root/src/gui/fonts
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-20 00:30:19 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-20 00:30:19 +0300
commit9c6a1ce0b669485967e7a81f0c96d122a9972957 (patch)
treeab1827e4cc371a26f40ff4ef2d65c2ecebc8b42d /src/gui/fonts
parent12478121f86ea50672f5e392bc2b1e29c7fac700 (diff)
downloadmanaplus-9c6a1ce0b669485967e7a81f0c96d122a9972957.tar.gz
manaplus-9c6a1ce0b669485967e7a81f0c96d122a9972957.tar.bz2
manaplus-9c6a1ce0b669485967e7a81f0c96d122a9972957.tar.xz
manaplus-9c6a1ce0b669485967e7a81f0c96d122a9972957.zip
Fix memory leak in fast text draw code.
Diffstat (limited to 'src/gui/fonts')
-rw-r--r--src/gui/fonts/font.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/fonts/font.cpp b/src/gui/fonts/font.cpp
index 58528f383..6ba7a2ffb 100644
--- a/src/gui/fonts/font.cpp
+++ b/src/gui/fonts/font.cpp
@@ -392,6 +392,8 @@ void Font::generate(TextChunk &chunk)
//search.erase(key);
cache->remove(chunk2);
chunk.img = chunk2->img;
+ chunk2->img = nullptr;
+ delete chunk2;
// logger->log("cached image: " + chunk.text);
}
else