Fix possible NULL pointer access in MobV2CAO
authorPerttu Ahola <celeron55@gmail.com>
Mon, 17 Oct 2011 21:41:02 +0000 (00:41 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 17 Oct 2011 21:41:02 +0000 (00:41 +0300)
src/content_cao.cpp

index b17c28109f356046e7c7a653a07f2ac0b7f986dd..67594eb9f9afdd48493eb70ebeadb76447215165 100644 (file)
@@ -993,6 +993,8 @@ void MobV2CAO::updateNodePos()
 void MobV2CAO::step(float dtime, ClientEnvironment *env)
 {
        scene::MyBillboardSceneNode *bill = m_node;
+       if(!bill)
+               return;
 
        pos_translator.translate(dtime);