mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
Fix bug in LuaUi::Element::destroy() that sometimes leads to an infinite loop on UI cleanup
This commit is contained in:
parent
5f6ca2a6d1
commit
c6eed2a6c6
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user