From b8f33e5a904e92e0839cf9f5a81c01263bfc5802 Mon Sep 17 00:00:00 2001 From: Chris Adamson Date: Mon, 23 Jun 2025 19:48:03 -0500 Subject: [PATCH] null check for new profiles with no raid data --- Libraries/SPTarkov.Server.Core/Controllers/MatchController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Libraries/SPTarkov.Server.Core/Controllers/MatchController.cs b/Libraries/SPTarkov.Server.Core/Controllers/MatchController.cs index e649e0d6..6ae8d62f 100644 --- a/Libraries/SPTarkov.Server.Core/Controllers/MatchController.cs +++ b/Libraries/SPTarkov.Server.Core/Controllers/MatchController.cs @@ -2,6 +2,7 @@ using SPTarkov.DI.Annotations; using SPTarkov.Server.Core.Helpers; using SPTarkov.Server.Core.Models.Eft.Match; using SPTarkov.Server.Core.Models.Spt.Config; +using SPTarkov.Server.Core.Models.Spt.Services; using SPTarkov.Server.Core.Models.Utils; using SPTarkov.Server.Core.Servers; using SPTarkov.Server.Core.Services; @@ -99,7 +100,8 @@ public class MatchController( request.IsNightRaid = _weatherHelper.IsNightTime(request.TimeVariant, request.Location); // Store request data for access during bot generation - _profileActivityService.GetProfileActivityRaidData(sessionId).RaidConfiguration = request; + ProfileActivityRaidData raidData = _profileActivityService.GetProfileActivityRaidData(sessionId); + if (raidData != null) raidData.RaidConfiguration = request; // TODO: add code to strip PMC of equipment now they've started the raid