Guard Find entity by name function

This commit is contained in:
maverickdgg 2022-11-17 04:55:46 +08:00
parent eb32e87387
commit c80a819b6e
1 changed files with 1 additions and 1 deletions

View File

@ -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;