From 3ac4f1e4bb23e4ef554b9dc7cc12288b60c19c31 Mon Sep 17 00:00:00 2001 From: DrakiaXYZ Date: Tue, 5 Nov 2024 18:44:04 +0000 Subject: [PATCH] Resolve exception caused by opening inventory preview during raid loading (!174) Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com> Reviewed-on: https://dev.sp-tarkov.com/SPT/Modules/pulls/174 Co-authored-by: DrakiaXYZ Co-committed-by: DrakiaXYZ --- .../Patches/MergeScavPmcQuestsOnInventoryLoadPatch.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/SPT.Custom/Patches/MergeScavPmcQuestsOnInventoryLoadPatch.cs b/project/SPT.Custom/Patches/MergeScavPmcQuestsOnInventoryLoadPatch.cs index f53eb78..f0f04ce 100644 --- a/project/SPT.Custom/Patches/MergeScavPmcQuestsOnInventoryLoadPatch.cs +++ b/project/SPT.Custom/Patches/MergeScavPmcQuestsOnInventoryLoadPatch.cs @@ -28,7 +28,7 @@ namespace SPT.Custom.Patches var gameWorld = Singleton.Instance; if (gameWorld != null) { - if (gameWorld.MainPlayer.Location != "hideout" && gameWorld.MainPlayer.Fraction == ETagStatus.Scav) + if (gameWorld.MainPlayer?.Location != "hideout" && gameWorld.MainPlayer?.Fraction == ETagStatus.Scav) { var pmcQuests = PatchConstants.BackEndSession.Profile.QuestsData; var scavQuests = PatchConstants.BackEndSession.ProfileOfPet.QuestsData;