summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/train_cmd.cpp2
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;