diff --git a/CAdvmapInterface.cpp b/CAdvmapInterface.cpp index 1e828dc5f..bde36bf5f 100644 --- a/CAdvmapInterface.cpp +++ b/CAdvmapInterface.cpp @@ -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) diff --git a/CPlayerInterface.cpp b/CPlayerInterface.cpp index d11b9a44d..57d8958d5 100644 --- a/CPlayerInterface.cpp +++ b/CPlayerInterface.cpp @@ -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 {