From 3e51da62647c76d106585499c1a4b96564a7c041 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 30 Jan 2016 20:45:19 +0100 Subject: [PATCH] Merge with develop --- code/ryzom/server/src/ai_service/commands.cpp | 4 +++- code/ryzom/server/src/ai_service/state_instance.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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()+"|"; } } diff --git a/code/ryzom/server/src/ai_service/state_instance.h b/code/ryzom/server/src/ai_service/state_instance.h index 4ad376576..916b6bc47 100644 --- a/code/ryzom/server/src/ai_service/state_instance.h +++ b/code/ryzom/server/src/ai_service/state_instance.h @@ -376,7 +376,7 @@ inline float CStateInstance::getNelVar(std::string const& varId) { TNelVarList::iterator it = _NelVar.find(varId); - if (it != _NelVar.end()) return it->second->get() + if (it != _NelVar.end()) return it->second->get(); if (NLMISC::CVariable::exists(varId)) {