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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user