AlexVinS 8 gadi atpakaļ
vecāks
revīzija
fc1938c341
1 mainītis faili ar 8 papildinājumiem un 2 dzēšanām
  1. 8 2
      client/battle/CBattleInterface.cpp

+ 8 - 2
client/battle/CBattleInterface.cpp

@@ -1416,9 +1416,15 @@ CBattleInterface::PossibleActions CBattleInterface::getCasterAction(const CSpell
 void CBattleInterface::setHeroAnimation(ui8 side, int phase)
 {
 	if(side == BattleSide::ATTACKER)
-		attackingHero->setPhase(phase);
+	{
+		if(attackingHero)
+			attackingHero->setPhase(phase);
+	}
 	else
-		defendingHero->setPhase(phase);
+	{
+		if(defendingHero)
+			defendingHero->setPhase(phase);
+	}
 }
 
 void CBattleInterface::castThisSpell(SpellID spellID)