mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Free now uninitialized std::map in CPlayerInterface::~CPlayerInterface.
This commit is contained in:
@@ -111,8 +111,11 @@ CPlayerInterface::~CPlayerInterface()
|
|||||||
|
|
||||||
for(std::map<int,SDL_Surface*>::iterator i=graphics->heroWins.begin(); i!= graphics->heroWins.end(); i++)
|
for(std::map<int,SDL_Surface*>::iterator i=graphics->heroWins.begin(); i!= graphics->heroWins.end(); i++)
|
||||||
SDL_FreeSurface(i->second);
|
SDL_FreeSurface(i->second);
|
||||||
|
graphics->heroWins.clear();
|
||||||
|
|
||||||
for(std::map<int,SDL_Surface*>::iterator i=graphics->townWins.begin(); i!= graphics->townWins.end(); i++)
|
for(std::map<int,SDL_Surface*>::iterator i=graphics->townWins.begin(); i!= graphics->townWins.end(); i++)
|
||||||
SDL_FreeSurface(i->second);
|
SDL_FreeSurface(i->second);
|
||||||
|
graphics->townWins.clear();
|
||||||
}
|
}
|
||||||
void CPlayerInterface::init(ICallback * CB)
|
void CPlayerInterface::init(ICallback * CB)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user