diff --git a/src/cargotype.cpp b/src/cargotype.cpp index f6509dd389..95c9708d4a 100644 --- a/src/cargotype.cpp +++ b/src/cargotype.cpp @@ -102,7 +102,7 @@ void BuildCargoLabelMap() _cargo_label_map.clear(); for (const CargoSpec &cs : CargoSpec::array) { /* During initialization, CargoSpec can be marked valid before the label has been set. */ - if (!cs.IsValid() || cs.label == CargoLabel{0}) continue; + if (!cs.IsValid() || cs.label == CargoLabel{0} || cs.label == CT_INVALID) continue; /* Label already exists, don't add again. */ if (_cargo_label_map.count(cs.label) != 0) continue;