summaryrefslogtreecommitdiff
path: root/src/saveload/afterload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/afterload.cpp')
-rw-r--r--src/saveload/afterload.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index bc3aa436a..d55b821e3 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -1275,6 +1275,14 @@ bool AfterLoadGame()
}
}
+ if (CheckSavegameVersion(120)) {
+ /* CargoPacket's source should be either INVALID_STATION or a valid station */
+ CargoPacket *cp;
+ FOR_ALL_CARGOPACKETS(cp) {
+ if (!Station::IsValidID(cp->source)) cp->source = INVALID_STATION;
+ }
+ }
+
/* Buoys do now store the owner of the previous water tile, which can never
* be OWNER_NONE. So replace OWNER_NONE with OWNER_WATER. */
if (CheckSavegameVersion(46)) {