diff --git a/components/fontloader/fontloader.cpp b/components/fontloader/fontloader.cpp index 6dcebe0bdd..605d552435 100644 --- a/components/fontloader/fontloader.cpp +++ b/components/fontloader/fontloader.cpp @@ -165,7 +165,14 @@ namespace Gui FontLoader::~FontLoader() { - MyGUI::ResourceManager::getInstance().unregisterLoadXmlDelegate("Resource"); + try + { + MyGUI::ResourceManager::getInstance().unregisterLoadXmlDelegate("Resource"); + } + catch(const MyGUI::Exception& e) + { + Log(Debug::Error) << "Error in the FontLoader destructor: " << e.what(); + } for (std::vector::iterator it = mTextures.begin(); it != mTextures.end(); ++it) delete *it;