From 6b0f7d9def6c3821085e95529c130d16d617cc47 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 28 May 2010 00:52:46 +0300 Subject: Fix memory leak in last patch. Reviewed-by: Bertram --- src/gui/truetypefont.cpp | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3-70-g09d2