aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guiChatConsole.cpp4
-rw-r--r--src/main.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/guiChatConsole.cpp b/src/guiChatConsole.cpp
index f31e599dc..3dfd0090a 100644
--- a/src/guiChatConsole.cpp
+++ b/src/guiChatConsole.cpp
@@ -121,7 +121,9 @@ GUIChatConsole::GUIChatConsole(
GUIChatConsole::~GUIChatConsole()
{
- delete m_font;
+#if USE_FREETYPE
+ m_font->drop();
+#endif
}
void GUIChatConsole::openConsole(f32 height)
diff --git a/src/main.cpp b/src/main.cpp
index 7f9ec1ace..d28ba9b9d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2145,7 +2145,9 @@ int main(int argc, char *argv[])
*/
device->drop();
- delete font;
+#if USE_FREETYPE
+ font->drop();
+#endif
#endif // !SERVER