mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Merge branch 'fix-mem-leak-2' into 'master'
Clean-up FontLoader::loadFontFromXml fix See merge request OpenMW/openmw!561
This commit is contained in:
commit
0d2cdd5b7b
@ -593,7 +593,7 @@ namespace Gui
|
||||
|
||||
if (createCopy)
|
||||
{
|
||||
MyGUI::xml::ElementPtr copy = _node->createCopy();
|
||||
std::unique_ptr<MyGUI::xml::Element> copy{_node->createCopy()};
|
||||
|
||||
MyGUI::xml::ElementEnumerator copyFont = copy->getElementEnumerator();
|
||||
while (copyFont.next("Resource"))
|
||||
@ -629,8 +629,7 @@ namespace Gui
|
||||
}
|
||||
}
|
||||
|
||||
MyGUI::ResourceManager::getInstance().loadFromXmlNode(copy, _file, _version);
|
||||
delete copy;
|
||||
MyGUI::ResourceManager::getInstance().loadFromXmlNode(copy.get(), _file, _version);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user