diff --git a/src/graphics/material_manager.cpp b/src/graphics/material_manager.cpp index ce1984f5c..7c227b7e5 100644 --- a/src/graphics/material_manager.cpp +++ b/src/graphics/material_manager.cpp @@ -60,6 +60,13 @@ MaterialManager::~MaterialManager() delete m_materials[i]; } m_materials.clear(); + + for (std::map ::iterator it = + m_default_materials.begin(); it != m_default_materials.end(); it++) + { + delete it->second; + } + m_default_materials.clear(); } // ~MaterialManager //----------------------------------------------------------------------------- diff --git a/src/guiengine/engine.cpp b/src/guiengine/engine.cpp index bcf3fd5e8..831ebfdb2 100644 --- a/src/guiengine/engine.cpp +++ b/src/guiengine/engine.cpp @@ -954,9 +954,9 @@ namespace GUIEngine //if (g_skin != NULL) delete g_skin; g_skin = NULL; - g_ft_env->~FTEnvironment(); + delete g_ft_env; g_ft_env = NULL; - g_gp_creator->~GlyphPageCreator(); + delete g_gp_creator; g_gp_creator = NULL; for (unsigned int i=0; i