1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-02 23:09:40 +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

(cherry picked from commit 364bc91f5b)

c6eed2a6 Fix bug in LuaUi::Element::destroy() that sometimes leads to an infinite loop on UI cleanup
This commit is contained in:
psi29a 2023-05-21 17:33:56 +00:00
parent 0e141dc06e
commit 4f919d9239

View file

@ -217,12 +217,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)