Browse Source

Silence "X doesn't have a base stack!" warning

AlexVinS 9 years ago
parent
commit
6d13c8938c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/BattleState.h

+ 2 - 0
lib/BattleState.h

@@ -271,6 +271,8 @@ public:
 				assert (hero);
 				assert (hero);
 				base = hero->commander;
 				base = hero->commander;
 			}
 			}
+			else if(slot == SlotID::WAR_MACHINES_SLOT || slot == SlotID::ARROW_TOWERS_SLOT)
+				base = nullptr;
 			else if(!army || slot == SlotID() || !army->hasStackAtSlot(slot))
 			else if(!army || slot == SlotID() || !army->hasStackAtSlot(slot))
 			{
 			{
 				base = nullptr;
 				base = nullptr;