src/depot_gui.cpp
changeset 8044 72c3e2bc6429
parent 7993 76b0eb3e19c9
child 8149 eb78fb69096f
equal deleted inserted replaced
8043:be5076cc40ef 8044:72c3e2bc6429
   472 {
   472 {
   473 	uint error_str;
   473 	uint error_str;
   474 
   474 
   475 	if (v == NULL) return;
   475 	if (v == NULL) return;
   476 
   476 
   477 	if (v->HasFront() && !v->IsPrimaryVehicle()) {
   477 	if (!v->IsPrimaryVehicle()) {
   478 		v = v->First();
   478 		v = v->First();
   479 		/* Do nothing when clicking on a train in depot with no loc attached */
   479 		/* Do nothing when clicking on a train in depot with no loc attached */
   480 		if (v->type == VEH_TRAIN && !IsFrontEngine(v)) return;
   480 		if (v->type == VEH_TRAIN && !IsFrontEngine(v)) return;
   481 	}
   481 	}
   482 
   482