From 5bf17060c069814947eb277897fc743ca608721f Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 30 Jan 2016 20:44:25 +0100 Subject: [PATCH] Fixed: Crash if spawnBot is NULL --HG-- branch : develop --- code/ryzom/server/src/ai_service/commands.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/ryzom/server/src/ai_service/commands.cpp b/code/ryzom/server/src/ai_service/commands.cpp index f44380cc3..8d8d1c7c9 100644 --- a/code/ryzom/server/src/ai_service/commands.cpp +++ b/code/ryzom/server/src/ai_service/commands.cpp @@ -1686,7 +1686,9 @@ NLMISC_COMMAND(getDatasetId,"get datasetid of bots with name matchiong the given FOREACH(itBot, vector, bots) { CBot* bot = *itBot; - DatasetIds += bot->getSpawnObj()->dataSetRow().toString()+"|"; + CSpawnBot* spawnBot = bot->getSpawnObj(); + if (spawnBot!=NULL) + DatasetIds += spawnBot->dataSetRow().toString()+"|"; } }