From ff25fef562bfa2b09b72fb33675ff672cbefdedf Mon Sep 17 00:00:00 2001 From: Mike Date: Sun, 7 Apr 2024 13:57:23 -0700 Subject: [PATCH] Fixed a crash that could result daily for some players. --- Separatism/Behaviours/LordRebellionBehaviour.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Separatism/Behaviours/LordRebellionBehaviour.cs b/Separatism/Behaviours/LordRebellionBehaviour.cs index 326dd5e..e54d535 100644 --- a/Separatism/Behaviours/LordRebellionBehaviour.cs +++ b/Separatism/Behaviours/LordRebellionBehaviour.cs @@ -27,6 +27,10 @@ private void OnDailyTickClan(Clan clan) } var kingdom = clan.Kingdom; + if (kingdom.RulingClan == null || kingdom.RulingClan.Leader == null) + { + return; + } var ruler = kingdom.Ruler(); if (clan.Leader != ruler)