1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-24 00:36:29 +02:00

Hopefully fixed buttons without making leak.

This commit is contained in:
Michał W. Urbańczyk
2008-01-21 18:22:51 +00:00
parent f0186c3858
commit 449e7b6773
3 changed files with 10 additions and 2 deletions

View File

@@ -316,6 +316,12 @@ CButtonBase::CButtonBase()
ourObj=NULL;
state=0;
}
CButtonBase::~CButtonBase()
{
for(int i =0; i<imgs.size();i++)
for(int j=0;j<imgs[i].size();j++)
SDL_FreeSurface(imgs[i][j]);
}
void CButtonBase::show(SDL_Surface * to)
{
if(!to)