Browse Source

fix mantiss 0002147

AlexVinS 10 years ago
parent
commit
b347fe5457
1 changed files with 4 additions and 3 deletions
  1. 4 3
      lib/spells/AdventureSpellMechanics.cpp

+ 4 - 3
lib/spells/AdventureSpellMechanics.cpp

@@ -268,9 +268,10 @@ ESpellCastResult ViewMechanics::applyAdventureEffects(const SpellCastEnvironment
 	for(const CGObjectInstance * obj : env->getMap()->objects)
 	{
 		//todo:we need to send only not visible objects
-
-		if(filterObject(obj, spellLevel))
-			pack.objectPositions.push_back(ObjectPosInfo(obj));
+		
+		if(obj)//for some reason deleted object remain as empty pointer
+			if(filterObject(obj, spellLevel))
+				pack.objectPositions.push_back(ObjectPosInfo(obj));
 	}
 
 	env->sendAndApply(&pack);