diff options
author | frosch <frosch@openttd.org> | 2009-01-17 16:25:32 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-01-17 16:25:32 +0000 |
commit | 2850bf9e006ebdd40b5562cca5117bca027cfab5 (patch) | |
tree | c4fa100b773d9230e686f51621516b6a25cde8aa | |
parent | 4bc7afae41f347be2f74bdfc993827c5ada655bd (diff) | |
download | openttd-2850bf9e006ebdd40b5562cca5117bca027cfab5.tar.xz |
(svn r15125) -Fix [FS#2544]: Do not try to determine the next order destination, if there are no orders.
-rw-r--r-- | src/train_cmd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 7f8f1678e..6aa7eda90 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -2839,6 +2839,8 @@ public: */ bool SwitchToNextOrder(bool skip_first) { + if (this->v->GetNumOrders() == 0) return false; + if (skip_first) ++this->index; int conditional_depth = 0; |