summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-08 15:54:36 +0000
committerrubidium <rubidium@openttd.org>2007-02-08 15:54:36 +0000
commit3d04e8f64d4c26b5e12243902269f61995780d61 (patch)
treecce90f03e85522a28c53c8d7b16d1ae856b0d619 /src/order_gui.cpp
parent6bbbedc8ccdeff63a05111151d7ffd0af2f436d7 (diff)
downloadopenttd-3d04e8f64d4c26b5e12243902269f61995780d61.tar.xz
(svn r8637) -Fix: CTRL-clicking on a hangar in the order list segfaulted as hangars are part of a station instead of real depots.
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r--src/order_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 9ef6f7f30..21b711fe7 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -464,7 +464,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;
}