summaryrefslogtreecommitdiff
path: root/src/saveload/newgrf_sl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/newgrf_sl.cpp')
-rw-r--r--src/saveload/newgrf_sl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/saveload/newgrf_sl.cpp b/src/saveload/newgrf_sl.cpp
index f7f6ab72e..2e9f1ccaf 100644
--- a/src/saveload/newgrf_sl.cpp
+++ b/src/saveload/newgrf_sl.cpp
@@ -30,7 +30,8 @@ static const SaveLoad _newgrf_mapping_desc[] = {
void Save_NewGRFMapping(const OverrideManagerBase &mapping)
{
for (uint i = 0; i < mapping.GetMaxMapping(); i++) {
- if (!mapping.IsValidID(i)) continue;
+ if (mapping.mapping_ID[i].grfid == 0 &&
+ mapping.mapping_ID[i].entity_id == 0) continue;
SlSetArrayIndex(i);
SlObject(&mapping.mapping_ID[i], _newgrf_mapping_desc);
}