mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
One more small fix for possible issues with gate surface
This commit is contained in:
parent
af05b025e7
commit
4240ecad01
@ -2836,9 +2836,11 @@ CBattleInterface::SiegeHelper::SiegeHelper(const CGTownInstance *siegeTown, cons
|
||||
|
||||
CBattleInterface::SiegeHelper::~SiegeHelper()
|
||||
{
|
||||
for(auto & elem : walls)
|
||||
auto gateState = owner->curInt->cb->battleGetGateState();
|
||||
for(int g = 0; g < ARRAY_COUNT(walls); ++g)
|
||||
{
|
||||
SDL_FreeSurface(elem);
|
||||
if(g != SiegeHelper::GATE || (gateState != EGateState::CLOSED && gateState != EGateState::BLOCKED))
|
||||
SDL_FreeSurface(walls[g]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user