From bb3c205e05b4f63db3cbaa9c001fca441b372364 Mon Sep 17 00:00:00 2001 From: belugas Date: Fri, 22 Aug 2008 01:14:25 +0000 Subject: [PATCH] (svn r14127) -Feature(ette): Give the the player's colour to the waypoint window been shown --- src/waypoint_gui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/waypoint_gui.cpp b/src/waypoint_gui.cpp index bf95ee8d15..1f1b81f150 100644 --- a/src/waypoint_gui.cpp +++ b/src/waypoint_gui.cpp @@ -37,6 +37,7 @@ public: WaypointWindow(const WindowDesc *desc, WindowNumber window_number) : Window(desc, window_number) { this->wp = GetWaypoint(this->window_number); + this->caption_color = (byte)GetTileOwner(this->wp->xy); this->flags4 |= WF_DISABLE_VP_SCROLL; InitializeWindowViewport(this, 3, 17, 254, 86, this->wp->xy, ZOOM_LVL_MIN); @@ -107,5 +108,6 @@ static const WindowDesc _waypoint_view_desc = { void ShowWaypointWindow(const Waypoint *wp) { + if (!wp->IsValid()) return; // little safety AllocateWindowDescFront(&_waypoint_view_desc, wp->index); }