[-] Fixed crash when showing unit name popup for destroyed unit
This commit is contained in:
parent
a2aa433dbc
commit
c0fea4f139
1 changed files with 1 additions and 1 deletions
|
@ -338,7 +338,7 @@ static void ShowUnitName(const CViewport &vp, PixelPos pos, CUnit *unit, bool hi
|
|||
int y = std::min<int>(GameCursor->G->Height + pos.y + 10, vp.BottomRightPos.y - 1 - height);
|
||||
const CPlayer *tplayer = ThisPlayer;
|
||||
|
||||
if (unit) {
|
||||
if (unit && unit->IsAliveOnMap()) {
|
||||
int backgroundColor;
|
||||
if (unit->Player->Index == (*tplayer).Index) {
|
||||
backgroundColor = Video.MapRGB(TheScreen->format, 0, 0, 252);
|
||||
|
|
Loading…
Add table
Reference in a new issue