Fixed bug when SceneGraph is destroyed

This commit is contained in:
Diren D Bharwani 2022-10-02 04:22:32 +08:00
parent 45d526c0e0
commit 0e518c52a9
1 changed files with 5 additions and 0 deletions

View File

@ -312,6 +312,11 @@ namespace SHADE
if (parentNode == nullptr)
{
SHLOG_WARNING("Removing Entity {}'s parent", entityID)
if (parent)
parent->RemoveChild(this);
return;
}
// Handle self assignment