浏览代码

* fixed crash with two-hex creatures

mateuszb 16 年之前
父节点
当前提交
08723ecf84
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      client/CBattleInterface.cpp

+ 4 - 0
client/CBattleInterface.cpp

@@ -1578,6 +1578,10 @@ void CBattleInterface::newRound(int number)
 
 void CBattleInterface::giveCommand(ui8 action, ui16 tile, ui32 stack, si32 additional)
 {
+	if(!LOCPLINT->cb->battleGetStackByID(stack))
+	{
+		return;
+	}
 	BattleAction * ba = new BattleAction(); //is deleted in CPlayerInterface::activeStack()
 	ba->side = defendingHeroInstance ? (LOCPLINT->playerID == defendingHeroInstance->tempOwner) : false;
 	ba->actionType = action;