mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Applied patch by rumianom from http://bugs.vcmi.eu/view.php?id=2442
This commit is contained in:
parent
57e588cba1
commit
6e24d1e929
@ -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]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user