diff --git a/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs b/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs index f0df6ac1..f6416bc5 100644 --- a/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs +++ b/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs @@ -1515,7 +1515,7 @@ public class HideoutController( foreach (var (sessionId, profile) in saveServer.GetProfiles()) { if ( - profile.CharacterData.PmcData.Hideout is not null + profile.CharacterData?.PmcData?.Hideout is not null && profileActivityService.ActiveWithinLastMinutes(sessionId, _hideoutConfig.UpdateProfileHideoutWhenActiveWithinMinutes) ) { diff --git a/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs b/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs index 64d087b2..98517c2f 100644 --- a/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs +++ b/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs @@ -59,10 +59,10 @@ public class RagfairController( foreach (var (sessionId, profile) in profileHelper.GetProfiles()) { // Check profile is capable of creating offers - var pmcProfile = profile.CharacterData.PmcData; + var pmcProfile = profile?.CharacterData?.PmcData; if ( - pmcProfile.RagfairInfo is not null - && pmcProfile.Info.Level >= databaseService.GetGlobals().Configuration.RagFair.MinUserLevel + pmcProfile?.RagfairInfo is not null + && pmcProfile?.Info?.Level >= databaseService.GetGlobals().Configuration.RagFair.MinUserLevel ) { ragfairOfferHelper.ProcessOffersOnProfile(sessionId);