Dont drop fonts with ENABLE_FREETYPE=0
authorPilzAdam <pilzadam@minetest.net>
Thu, 16 May 2013 00:19:32 +0000 (02:19 +0200)
committerPilzAdam <pilzadam@minetest.net>
Thu, 16 May 2013 00:20:10 +0000 (02:20 +0200)
src/guiChatConsole.cpp
src/main.cpp

index f31e599dc7eeb6f017a4d3c567e4346eb3d4acfa..3dfd0090a6c6b224898b06ed678ec41269f33eb8 100644 (file)
@@ -121,7 +121,9 @@ GUIChatConsole::GUIChatConsole(
 
 GUIChatConsole::~GUIChatConsole()
 {
-       delete m_font;
+#if USE_FREETYPE
+       m_font->drop();
+#endif
 }
 
 void GUIChatConsole::openConsole(f32 height)
index 7f9ec1ace13385a808787888e3946e559207d493..d28ba9b9dbcddb3e041288406b25e72b9016f2fb 100644 (file)
@@ -2145,7 +2145,9 @@ int main(int argc, char *argv[])
        */
        device->drop();
 
-       delete font;
+#if USE_FREETYPE
+       font->drop();
+#endif
 
 #endif // !SERVER