summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-04-08 15:29:20 +0000
committerrubidium <rubidium@openttd.org>2010-04-08 15:29:20 +0000
commitfb364e4426d23a84aa3f36a594ece73ddc0fed70 (patch)
tree86720b42668b87fe17ed79779c0b6d3071542b1a /src
parent7f531267dccdf36353442ee8b1bd52a1d90b0ec7 (diff)
downloadopenttd-fb364e4426d23a84aa3f36a594ece73ddc0fed70.tar.xz
(svn r19584) -Fix [FS#3744]: Crash when pressing 'h' (non-stop) in the order window of a ship or aircraft
Diffstat (limited to 'src')
-rw-r--r--src/order_gui.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index bad433a08..5030d003a 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -621,6 +621,8 @@ private:
*/
void OrderClick_Nonstop(int non_stop)
{
+ if (this->vehicle->type != VEH_TRAIN && this->vehicle->type != VEH_ROAD) return;
+
VehicleOrderID sel_ord = this->OrderGetSel();
const Order *order = this->vehicle->GetOrder(sel_ord);