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
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

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