This commit is contained in:
pelya
2016-04-03 13:55:34 +03:00
parent 8b686b812d
commit 844cb32a88

View File

@@ -1637,7 +1637,7 @@ static void LoadUnloadVehicle(Vehicle *front)
CargoPayment *payment = front->cargo_payment;
uint artic_part = 0; // Articulated part we are currently trying to load. (not counting parts without capacity)
for (Vehicle *v = front; v != NULL; v = v->Next()) {
for (Vehicle *v = front; v != NULL && payment != NULL; v = v->Next()) {
if (v == front || !v->Previous()->HasArticulatedPart()) artic_part = 0;
if (v->cargo_cap == 0) continue;
artic_part++;