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 | 3940ed7e6f0bcb4fbe74c632254d6824692864dd (patch) | |
tree | c4fa100b773d9230e686f51621516b6a25cde8aa /src | |
parent | fac5cee3d3a0dd116f548c92a569c5cb58ed29ee (diff) | |
download | openttd-3940ed7e6f0bcb4fbe74c632254d6824692864dd.tar.xz |
(svn r15125) -Fix [FS#2544]: Do not try to determine the next order destination, if there are no orders.
Diffstat (limited to 'src')
-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; |