1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Catch MyGUI exceptions in the FontLoader destructor

This commit is contained in:
Andrei Kortunov 2020-06-18 15:13:02 +04:00
parent 808c905e1f
commit 6357bc3dad

View File

@ -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<MyGUI::ITexture*>::iterator it = mTextures.begin(); it != mTextures.end(); ++it)
delete *it;