diff --git a/project/SPT.Custom/Patches/MergeScavPmcQuestsOnInventoryLoadPatch.cs b/project/SPT.Custom/Patches/MergeScavPmcQuestsOnInventoryLoadPatch.cs index f0f04ce..7aa059b 100644 --- a/project/SPT.Custom/Patches/MergeScavPmcQuestsOnInventoryLoadPatch.cs +++ b/project/SPT.Custom/Patches/MergeScavPmcQuestsOnInventoryLoadPatch.cs @@ -26,15 +26,17 @@ namespace SPT.Custom.Patches public static void PatchPreFix(ref IEnumerable quests) { 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; - quests = pmcQuests.Concat(scavQuests); - } - } + var pmcQuests = PatchConstants.BackEndSession.Profile?.QuestsData; + var scavQuests = PatchConstants.BackEndSession.ProfileOfPet?.QuestsData; + if (pmcQuests != null && scavQuests != null) + { + quests = pmcQuests.Concat(scavQuests); + } + + } } } } \ No newline at end of file