1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-13 21:40:11 +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;
}