Guard Find entity by name function
This commit is contained in:
parent
eb32e87387
commit
c80a819b6e
|
@ -218,7 +218,7 @@ namespace SHADE
|
|||
EntityID result = MAX_EID;
|
||||
for (auto& entity : entityVec)
|
||||
{
|
||||
if (entity->name == name)
|
||||
if (entity && entity->name == name)
|
||||
result = entity->GetEID();
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue