Actually fix the bug, see previous commit

This commit is contained in:
Tamás Bálint Misius
2021-01-04 21:49:09 +01:00
parent 1e67a579fd
commit 9f47e6c028

View File

@@ -83,8 +83,11 @@ int LuaComponent::visible(lua_State * l)
LuaComponent::~LuaComponent() LuaComponent::~LuaComponent()
{ {
if(component && component->GetParentWindow()) if (component)
{
if (component->GetParentWindow())
component->GetParentWindow()->RemoveComponent(component); component->GetParentWindow()->RemoveComponent(component);
delete component; delete component;
}
} }
#endif #endif