From d6022c3a8014566438741c69a5d2efebb9093135 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 30 Jan 2016 18:15:48 +0100 Subject: [PATCH] Fixed: AIS crash if variable not initialized (forgot to commit) --- code/ryzom/server/src/ai_service/state_instance.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/ryzom/server/src/ai_service/state_instance.h b/code/ryzom/server/src/ai_service/state_instance.h index 3bf8ffeba..4ad376576 100644 --- a/code/ryzom/server/src/ai_service/state_instance.h +++ b/code/ryzom/server/src/ai_service/state_instance.h @@ -423,7 +423,7 @@ inline std::string CStateInstance::getStrNelVar(std::string const& varId) { TStrNelVarList::iterator it = _StrNelVar.find(varId); - if (it!=_StrNelVar.end()) return it->second->get(); + if (it != _StrNelVar.end()) return it->second->get(); if (NLMISC::CVariable::exists(varId)) { @@ -431,8 +431,8 @@ std::string CStateInstance::getStrNelVar(std::string const& varId) return ""; } - _StrNelVar[varId] = new NLMISC::CVariable("StateInstanceVar", varId.c_str(), "", std::string()); - return _NelVar[varId]->get(); + _StrNelVar[varId] = new NLMISC::CVariable("StateInstanceStrVar", varId.c_str(), "", std::string()); + return _StrNelVar[varId]->get(); } inline