diff --git a/ImperatorToCK3/CK3/Religions/ReligionCollection.cs b/ImperatorToCK3/CK3/Religions/ReligionCollection.cs index f39ce976c..fcc45f39a 100644 --- a/ImperatorToCK3/CK3/Religions/ReligionCollection.cs +++ b/ImperatorToCK3/CK3/Religions/ReligionCollection.cs @@ -319,7 +319,11 @@ Date date } var holderId = title.GetHolderId(date); if (holderId != "0") { - var holder = characters[holderId]; + if (!characters.TryGetValue(holderId, out var holder)) { + Logger.Warn($"Religious head {holderId} of title {title.Id} for {faith.Id} not found!"); + return; + } + var holderDeathDate = holder.DeathDate; if (holderDeathDate is null || holderDeathDate > date) { return;