summaryrefslogtreecommitdiff
path: root/src/rail_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r--src/rail_gui.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index 6d70686fd..b024625fa 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -2042,5 +2042,11 @@ DropDownList GetRailTypeDropDownList(bool for_replacement, bool all_option)
item->SetParam(1, rti->max_speed);
list.emplace_back(item);
}
+
+ if (list.size() == 0) {
+ /* Empty dropdowns are not allowed */
+ list.emplace_back(new DropDownListStringItem(STR_NONE, INVALID_RAILTYPE, true));
+ }
+
return list;
}