From 4efe34b23536f8ba60f1456ad5ed907fa75c51d0 Mon Sep 17 00:00:00 2001 From: Seweryn Presnal Date: Sat, 31 Aug 2024 16:21:24 +0200 Subject: [PATCH] Fix exception when christianity_religion is not found in CK3 --- ImperatorToCK3/CK3/World.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImperatorToCK3/CK3/World.cs b/ImperatorToCK3/CK3/World.cs index dc689e885..cfc769b01 100644 --- a/ImperatorToCK3/CK3/World.cs +++ b/ImperatorToCK3/CK3/World.cs @@ -575,7 +575,7 @@ private void HandleIcelandAndFaroeIslands(Configuration config) { break; case < 874: faithCandidates = new OrderedSet { "insular_celtic", "catholic", "orthodox" }; - var christianFaiths = Religions["christianity_religion"].Faiths; + var christianFaiths = Religions.TryGetValue("christianity_religion", out var christianityReligion) ? christianityReligion.Faiths : []; // If there is at least one Irish Christian county, give it to the Irish Papar. // If there is at least one Christian county of another Gaelic culture, give it to a character of this Gaelic culture.