From a9db6ce524bbc52a8620a077fd091fc1f1b01ee6 Mon Sep 17 00:00:00 2001 From: Tyfon <29051038+tyfon7@users.noreply.github.com> Date: Thu, 12 Sep 2024 02:43:25 -0700 Subject: [PATCH] Fix null ref in reload-in-place --- Patches/ReloadInPlacePatches.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Patches/ReloadInPlacePatches.cs b/Patches/ReloadInPlacePatches.cs index a1a7b73..364bb4b 100644 --- a/Patches/ReloadInPlacePatches.cs +++ b/Patches/ReloadInPlacePatches.cs @@ -59,7 +59,7 @@ public static class ReloadInPlacePatches [PatchPostfix] public static void Postfix(MagazineClass __result) { - if (IsReloading) + if (__result != null && IsReloading) { FoundMagazine = __result; FoundAddress = FoundMagazine.Parent;