Fix crash when applying changes to prefab

This commit is contained in:
Wojtek Figat
2021-01-28 00:38:08 +01:00
parent bb84ad0f79
commit a1cee0f0bf

View File

@@ -850,7 +850,11 @@ bool Prefab::ApplyAllInternal(Actor* targetActor, bool linkTargetActorObjectToPr
}
// Keep root unlinked
root->_parent = nullptr;
if (root->_parent)
{
root->_parent->Children.Remove(root);
root->_parent = nullptr;
}
}
// Link objects hierarchy