summaryrefslogtreecommitdiff
path: root/vehicle_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'vehicle_gui.c')
-rw-r--r--vehicle_gui.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c
index 0af603411..d7d1992c8 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -1553,10 +1553,9 @@ static void DrawVehicleListWindow(Window *w)
switch (window_type) {
case VLW_SHARED_ORDERS: /* Shared Orders */
if (vl->l.list_length == 0) {
- /* The list is empty, so the last vehicle is sold or crashed */
- /* Delete the window because the order is now not in use anymore */
- DeleteWindow(w);
- return;
+ /* We can't open this window without vehicles using this order
+ * and we should close the window when deleting the order */
+ NOT_REACHED();
}
SetDParam(0, w->vscroll.count);
break;