From e3c71534e120e1cfaeb4c92a414f4539b20fe85b Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 8 Feb 2007 16:17:15 +0000 Subject: [PATCH] (svn r8638) [0.5] -Backport from trunk (8637): -Fix: CTRL-clicking on a hangar in the order list segfaulted as hangars are part of a station instead of real depots --- order_gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/order_gui.c b/order_gui.c index adcaadba0d..44d8fd43d2 100644 --- a/order_gui.c +++ b/order_gui.c @@ -441,7 +441,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e) switch (ord->type) { case OT_GOTO_STATION: xy = GetStation(ord->dest)->xy ; break; - case OT_GOTO_DEPOT: xy = GetDepot(ord->dest)->xy; break; + case OT_GOTO_DEPOT: xy = (v->type == VEH_Aircraft) ? GetStation(ord->dest)->xy : GetDepot(ord->dest)->xy; break; case OT_GOTO_WAYPOINT: xy = GetWaypoint(ord->dest)->xy; break; default: xy = 0; break; }