1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

* fixed crashbug with dissmising heroes

* fixed bug with hero list redrawing after dissmissing
This commit is contained in:
Pioxan 2008-03-01 14:50:22 +00:00
parent 68d37e1507
commit 1b55f6457f
2 changed files with 4 additions and 1 deletions

View File

@ -302,7 +302,9 @@ void CTerrainRect::clickLeft(tribool down)
currentPath=NULL;
}
}
const CGHeroInstance * currentHero = LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].first;
const CGHeroInstance * currentHero = (LOCPLINT->adventureInt->heroList.items.size())?(LOCPLINT->adventureInt->heroList.items[LOCPLINT->adventureInt->heroList.selected].first):(NULL);
if(!currentHero)
return;
int3 bufpos = currentHero->getPosition(false);
//bufpos.x-=1;
if (mres)

View File

@ -2200,6 +2200,7 @@ void CHeroList::updateHList()
genList();
if(selected>=items.size())
select(items.size()-1);
draw();
}
void CHeroList::updateMove(const CGHeroInstance* which) //draws move points bar
{