From 1087b32e13798120eb79acd92376e88e05517d75 Mon Sep 17 00:00:00 2001 From: Chomp Date: Sun, 22 Jun 2025 12:57:26 +0100 Subject: [PATCH] Improved `GetLocation()` ability to handle nulls --- Libraries/SPTarkov.Server.Core/Services/DatabaseService.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Services/DatabaseService.cs b/Libraries/SPTarkov.Server.Core/Services/DatabaseService.cs index 53ded218..a7803ea0 100644 --- a/Libraries/SPTarkov.Server.Core/Services/DatabaseService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/DatabaseService.cs @@ -121,8 +121,7 @@ public class DatabaseService( /// assets/database/locations/ public Location? GetLocation(string locationId) { - var locations = GetLocations(); - var desiredLocation = locations.GetByJsonProp(locationId.ToLower()); + var desiredLocation = GetLocations()?.GetByJsonProp(locationId.ToLower()); if (desiredLocation == null) { _logger.Error(