src/order_gui.cpp
branchnoai
changeset 10867 5de2923d6e59
parent 10776 07203fc29812
child 10920 e33442a2b239
--- a/src/order_gui.cpp	Sun Jun 08 14:00:40 2008 +0000
+++ b/src/order_gui.cpp	Sun Jun 08 15:32:10 2008 +0000
@@ -566,6 +566,7 @@
 	{
 		/* Don't skip when there's nothing to skip */
 		if (_ctrl_pressed && w->vehicle->cur_order_index == w->OrderGetSel()) return;
+		if (w->vehicle->num_orders == 0) return;
 
 		DoCommandP(w->vehicle->tile, w->vehicle->index, _ctrl_pressed ? w->OrderGetSel() : ((w->vehicle->cur_order_index + 1) % w->vehicle->num_orders),
 				NULL, CMD_SKIP_TO_ORDER | CMD_MSG(_ctrl_pressed ? STR_CAN_T_SKIP_TO_ORDER : STR_CAN_T_SKIP_ORDER));