(svn r8638) [0.5] -Backport from trunk (8637): 0.5
authorrubidium
Thu, 08 Feb 2007 16:17:15 +0000
branch0.5
changeset 5434 a3d7ea66ba2a
parent 5433 c136db538201
child 5435 c1fef8c3fc7e
(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
--- a/order_gui.c	Thu Feb 08 14:10:14 2007 +0000
+++ b/order_gui.c	Thu Feb 08 16:17:15 2007 +0000
@@ -441,7 +441,7 @@
 
 				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;
 				}