We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c02f6f commit 83de929Copy full SHA for 83de929
ImperatorToCK3/CK3/World.cs
@@ -1201,7 +1201,7 @@ private void GenerateFillerHoldersForUnownedLands(Imperator.Provinces.ProvinceCo
1201
// This fixes stuff like a vanilla Tang China in one county.
1202
var irProvIds = county.CountyProvinceIds
1203
.SelectMany(id => provinceMapper.GetImperatorProvinceNumbers(id)).ToArray();
1204
- if (irProvIds.Length > 0 && irProvIds.All(p => irProvinces[p].OwnerCountry is null)) {
+ if (irProvIds.Length > 0 && irProvIds.All(p => !irProvinces.TryGetValue(p, out var irProv) || irProv.OwnerCountry is null)) {
1205
Logger.Debug($"Adding {county.Id} to unheld counties because all its provinces are mapped to I:R wastelands.");
1206
unheldCounties.Add(county);
1207
continue;
0 commit comments