Skip to content

Commit

Permalink
Fix exception in another place
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains committed Dec 14, 2023
1 parent 1bd3be7 commit 9b6f80a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ImperatorToCK3/CK3/Titles/LandedTitles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,10 @@ double CalculateCountyDevelopment(Title county, IReadOnlyDictionary<ulong, int>
IEnumerable<ulong> countyProvinceIds = county.CountyProvinces;
int provsCount = 0;
foreach (var ck3ProvId in countyProvinceIds) {
var ck3Province = ck3Provinces[ck3ProvId];
if (!ck3Provinces.TryGetValue(ck3ProvId, out var ck3Province)) {
Logger.Warn($"CK3 province {ck3ProvId} not found!");
continue;
}
++provsCount;
var sourceProvinces = ck3Province.ImperatorProvinces;
if (sourceProvinces.Count == 0) {
Expand Down

0 comments on commit 9b6f80a

Please sign in to comment.