Fixed: Crash if spawnBot is NULL

This commit is contained in:
kervala 2016-01-30 20:44:25 +01:00
parent d6022c3a80
commit 8a31b29d30

View file

@ -1686,7 +1686,9 @@ NLMISC_COMMAND(getDatasetId,"get datasetid of bots with name matchiong the given
FOREACH(itBot, vector<CBot*>, bots)
{
CBot* bot = *itBot;
DatasetIds += bot->getSpawnObj()->dataSetRow().toString()+"|";
CSpawnBot* spawnBot = bot->getSpawnObj();
if (spawnBot!=NULL)
DatasetIds += spawnBot->dataSetRow().toString()+"|";
}
}