From 0421c9e9c886b420dd23c87fcea4df2756651a94 Mon Sep 17 00:00:00 2001 From: arunas Date: Sat, 21 Oct 2023 22:58:19 +0300 Subject: [PATCH] fix issue #221 --- .../CampaignBehaviors/WarExhaustionBehavior.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bannerlord.Diplomacy/CampaignBehaviors/WarExhaustionBehavior.cs b/src/Bannerlord.Diplomacy/CampaignBehaviors/WarExhaustionBehavior.cs index df5914e0..8189cba1 100644 --- a/src/Bannerlord.Diplomacy/CampaignBehaviors/WarExhaustionBehavior.cs +++ b/src/Bannerlord.Diplomacy/CampaignBehaviors/WarExhaustionBehavior.cs @@ -169,7 +169,7 @@ private void OnHeroKilled(Hero victim, Hero killer, KillCharacterAction.KillChar return; } - _warExhaustionManager.AddHeroPerishedWarExhaustion(kingdoms, victim, killer.PartyBelongedTo.Name ?? effector!.Name, detail); + _warExhaustionManager.AddHeroPerishedWarExhaustion(kingdoms, victim, killer.PartyBelongedTo?.Name ?? effector!.Name, detail); } @@ -251,4 +251,4 @@ public override void SyncData(IDataStore dataStore) } } } -} \ No newline at end of file +}