From 203acf6d627a15920fa64befbd0197d8c1c5a149 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 14 Feb 2015 12:47:54 +0100 Subject: [PATCH] Changed: Check getSpawn() before calling its methods --- code/ryzom/server/src/ai_service/ai_bot_npc.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/ryzom/server/src/ai_service/ai_bot_npc.cpp b/code/ryzom/server/src/ai_service/ai_bot_npc.cpp index cb183850e..8a7518709 100644 --- a/code/ryzom/server/src/ai_service/ai_bot_npc.cpp +++ b/code/ryzom/server/src/ai_service/ai_bot_npc.cpp @@ -714,9 +714,12 @@ void CBotNpc::sendVPA() // alternate VPA void CBotNpc::sendVisualProperties() // VisualPropertyA, B, C { - CMirrors::setVisualPropertyA( getSpawn()->dataSetRow(), _VisualPropertyA ); - CMirrors::setVisualPropertyB( getSpawn()->dataSetRow(), _VisualPropertyB ); - CMirrors::setVisualPropertyC( getSpawn()->dataSetRow(), _VisualPropertyC ); + if (getSpawn()) + { + CMirrors::setVisualPropertyA( getSpawn()->dataSetRow(), _VisualPropertyA ); + CMirrors::setVisualPropertyB( getSpawn()->dataSetRow(), _VisualPropertyB ); + CMirrors::setVisualPropertyC( getSpawn()->dataSetRow(), _VisualPropertyC ); + } } bool CBotNpc::reSpawn(bool sendMessage)