summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2010-05-28 00:52:46 +0300
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_fr>2010-05-28 00:26:28 +0200
commit6b0f7d9def6c3821085e95529c130d16d617cc47 (patch)
tree13fa413ce04f2de6e2dfcc57a5b0403f0132ee69
parent6c91c7eed18ad377484e7f0edf6eff520f056c13 (diff)
downloadmana-6b0f7d9def6c3821085e95529c130d16d617cc47.tar.gz
mana-6b0f7d9def6c3821085e95529c130d16d617cc47.tar.bz2
mana-6b0f7d9def6c3821085e95529c130d16d617cc47.tar.xz
mana-6b0f7d9def6c3821085e95529c130d16d617cc47.zip
Fix memory leak in last patch.
Reviewed-by: Bertram
-rw-r--r--src/gui/truetypefont.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/truetypefont.cpp b/src/gui/truetypefont.cpp
index 55d1a18a..e2ae5b93 100644
--- a/src/gui/truetypefont.cpp
+++ b/src/gui/truetypefont.cpp
@@ -181,6 +181,7 @@ int TrueTypeFont::getWidth(const std::string &text) const
int w, h;
const char* str = getSafeUtf8String(text);
TTF_SizeUTF8(mFont, str, &w, &h);
+ delete[] str;
return w;
}