1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
This commit is contained in:
AlexVinS 2016-08-01 18:28:14 +03:00
parent 57e588cba1
commit 6e24d1e929

View File

@ -2760,7 +2760,7 @@ void CBattleInterface::gateStateChanged(const EGateState state)
break;
}
if(oldState != EGateState::CLOSED && oldState != EGateState::BLOCKED)
if(oldState != EGateState::NONE && oldState != EGateState::CLOSED && oldState != EGateState::BLOCKED)
SDL_FreeSurface(siegeH->walls[SiegeHelper::GATE]);
if(stateId != EWallState::NONE)
@ -2839,7 +2839,7 @@ CBattleInterface::SiegeHelper::~SiegeHelper()
auto gateState = owner->curInt->cb->battleGetGateState();
for(int g = 0; g < ARRAY_COUNT(walls); ++g)
{
if(g != SiegeHelper::GATE || (gateState != EGateState::CLOSED && gateState != EGateState::BLOCKED))
if(g != SiegeHelper::GATE || (gateState != EGateState::NONE && gateState != EGateState::CLOSED && gateState != EGateState::BLOCKED))
SDL_FreeSurface(walls[g]);
}
}