Skip to content

Commit

Permalink
FIX: Crash in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jamespetts committed Jan 16, 2020
1 parent b748106 commit 7e076b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vehicle/simvehicle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4426,7 +4426,7 @@ DBG_MESSAGE("rail_vehicle_t::rail_vehicle_t()","replaced by %s",desc->get_name()
else {
dbg->error("rail_vehicle_t::rail_vehicle_t()","no matching desc found for %s!",w->get_name());
}
if (!empty && fracht[0].front().menge == 0) {
if (!empty && !fracht->empty() && fracht[0].front().menge == 0) {
// this was only there to find a matching vehicle
fracht[0].remove_first();
}
Expand Down

0 comments on commit 7e076b4

Please sign in to comment.