FIxed major crashes caused by main camera retrieval and entity destroy #242
|
@ -14,7 +14,3 @@
|
|||
13 14
|
||||
14 15
|
||||
15 16
|
||||
|
||||
note:
|
||||
All collision tags should follow the above format "index<space>tag name".
|
||||
If it fails to follow this, the default tag names will be used.
|
|
@ -43,7 +43,9 @@ namespace SHADE
|
|||
if (!camComponent)
|
||||
{
|
||||
SHLOG_WARNING("Camera Director warning: Entity does not have a camera");
|
||||
return nullptr;
|
||||
}
|
||||
return camComponent;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace SHADE
|
|||
//Call all the children to Destroy themselves first before the parent is destroyed.
|
||||
if (entityVec[eIndex])
|
||||
{
|
||||
auto& children = SHSceneManager::GetCurrentSceneGraph().GetChildren(eID);
|
||||
auto children = SHSceneManager::GetCurrentSceneGraph().GetChildren(eID);
|
||||
for (auto& child : children)
|
||||
{
|
||||
DestroyEntity(child->GetEntityID());
|
||||
|
|
Loading…
Reference in New Issue