1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +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

@@ -25,7 +25,8 @@ AdventureMapButton<T>::AdventureMapButton
name=Name;
helpBox=HelpBox;
int est = LOCPLINT->playerID;
CDefHandler * temp = CGI->spriteh->giveDef(defName); //todo: moze cieknac
CDefHandler * temp = CGI->spriteh->giveDef(defName);
temp->notFreeImgs = true;
for (int i=0;i<temp->ourImages.size();i++)
{
imgs.resize(1);
@@ -39,6 +40,7 @@ AdventureMapButton<T>::AdventureMapButton
for (int i=0; i<add->size();i++)
{
temp = CGI->spriteh->giveDef((*add)[i]);
temp->notFreeImgs = true;
for (int j=0;j<temp->ourImages.size();j++)
{
imgs[i+1].push_back(temp->ourImages[j].bitmap);