1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 17:09:41 +00:00

Fix crash when destroying UI element in the same frame as creating it

This commit is contained in:
uramer 2024-03-14 18:08:18 +01:00
parent 2764d8ceff
commit 2f40491065

View file

@ -313,9 +313,8 @@ namespace LuaUi
{
if (mState != Destroyed)
{
if (mState != New)
if (mRoot != nullptr)
{
assert(mRoot);
destroyRoot(mRoot);
mRoot = nullptr;
}