1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +02:00

Fixed crash with Firewall / Forcefield cast when there is dead stack.

This commit is contained in:
DjWarmonger
2013-02-11 20:08:53 +00:00
parent 8249e15f0f
commit 4f75e47c47

View File

@ -2925,7 +2925,7 @@ void CBattleInterface::handleHex(BattleHex myNumber, int eventType)
auto tilesThatMustBeClear = sp->rangeInHexes(myNumber, hero->getSpellSchoolLevel(sp), side, &hexesOutsideBattlefield); auto tilesThatMustBeClear = sp->rangeInHexes(myNumber, hero->getSpellSchoolLevel(sp), side, &hexesOutsideBattlefield);
BOOST_FOREACH(BattleHex hex, tilesThatMustBeClear) BOOST_FOREACH(BattleHex hex, tilesThatMustBeClear)
{ {
if(curInt->cb->battleGetStackByPos(hex) || !!curInt->cb->battleGetObstacleOnPos(hex, false) if(curInt->cb->battleGetStackByPos(hex, false) || !!curInt->cb->battleGetObstacleOnPos(hex, false)
|| !hex.isAvailable()) || !hex.isAvailable())
{ {
legalAction = false; legalAction = false;