Lazy fix for crash https://bugs.openttd.org/task/6437
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user