From c0fea4f139d767295d8af9a89f5045f3c7d69a0c Mon Sep 17 00:00:00 2001 From: cybermind <iddqd_mail@mail.ru> Date: Fri, 29 Mar 2013 16:27:43 +0600 Subject: [PATCH] [-] Fixed crash when showing unit name popup for destroyed unit --- src/map/map_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/map_draw.cpp b/src/map/map_draw.cpp index 125009c09..2d6d9fc1f 100644 --- a/src/map/map_draw.cpp +++ b/src/map/map_draw.cpp @@ -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);