]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix storage exception (#21752)
authorLeon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Sun, 19 Nov 2023 02:10:27 +0000 (15:10 +1300)
committerGitHub <noreply@github.com>
Sun, 19 Nov 2023 02:10:27 +0000 (13:10 +1100)
Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs

index 88e263b5562a97244b4aa7bbdc458879a2b10acb..ef7930fe2b6463c5d8b64f98da9c641e397469b1 100644 (file)
@@ -390,6 +390,10 @@ public abstract class SharedStorageSystem : EntitySystem
         if (!Resolve(uid, ref storage, ref appearance, false))
             return;
 
+        // ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
+        if (storage.Container == null)
+            return; // component hasn't yet been initialized.
+
         int capacity;
         int used;
         if (storage.MaxSlots == null)