]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix NRE in GasTileOverlaySystem (#36793)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Mon, 21 Apr 2025 05:06:54 +0000 (15:06 +1000)
committerGitHub <noreply@github.com>
Mon, 21 Apr 2025 05:06:54 +0000 (15:06 +1000)
Content.Server/Atmos/EntitySystems/GasTileOverlaySystem.cs

index ae067d5523a514e020f192f3f737cf90ce2d617a..4882e93d23050a74d2754947574e55297850f92d 100644 (file)
@@ -68,6 +68,9 @@ namespace Content.Server.Atmos.EntitySystems
         {
             base.Initialize();
 
+            _query = GetEntityQuery<GasTileOverlayComponent>();
+            _gridQuery = GetEntityQuery<MapGridComponent>();
+
             _updateJob = new UpdatePlayerJob()
             {
                 EntManager = EntityManager,
@@ -88,8 +91,6 @@ namespace Content.Server.Atmos.EntitySystems
 
             SubscribeLocalEvent<RoundRestartCleanupEvent>(Reset);
             SubscribeLocalEvent<GasTileOverlayComponent, ComponentStartup>(OnStartup);
-            _query = GetEntityQuery<GasTileOverlayComponent>();
-            _gridQuery = GetEntityQuery<MapGridComponent>();
         }
 
         private void OnStartup(EntityUid uid, GasTileOverlayComponent component, ComponentStartup args)