1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +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)