diff --git a/components/lua_ui/element.cpp b/components/lua_ui/element.cpp index 9d45f6ed7f..c239335abb 100644 --- a/components/lua_ui/element.cpp +++ b/components/lua_ui/element.cpp @@ -313,9 +313,8 @@ namespace LuaUi { if (mState != Destroyed) { - if (mState != New) + if (mRoot != nullptr) { - assert(mRoot); destroyRoot(mRoot); mRoot = nullptr; }