diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index 5948415a62..4c561d8dea 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -2377,6 +2377,10 @@ bool AfterLoadGame() * get messed up just after loading the savegame. This fixes that. */ Vehicle *v; FOR_ALL_VEHICLES(v) { + /* Not all vehicle types can be inside a tunnel. Furthermore, + * testing IsTunnelTile() for invalid tiles causes a crash. */ + if (!v->IsGroundVehicle()) continue; + /* Is the vehicle in a tunnel? */ if (!IsTunnelTile(v->tile)) continue;