1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 10:39:41 +00:00

Merge branch 'fix_element_destroy' into 'master'

Fix bug in LuaUi::Element::destroy() that sometimes leads to an infinite loop on UI cleanup

See merge request OpenMW/openmw!3033
This commit is contained in:
psi29a 2023-05-21 17:33:56 +00:00
commit 364bc91f5b

View file

@ -216,12 +216,12 @@ namespace LuaUi
void Element::destroy()
{
sAllElements.erase(this);
if (!mRoot)
return;
destroyWidget(mRoot);
mRoot = nullptr;
mLayout = sol::make_object(mLayout.lua_state(), sol::nil);
sAllElements.erase(this);
}
void Element::attachToWidget(WidgetExtension* w)