From 8892e9e3ae4982cb3b9d374b18fb5fc4d52020bf Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:10:27 +1300 Subject: [PATCH] Fix storage exception (#21752) --- Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs index 88e263b556..ef7930fe2b 100644 --- a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs @@ -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) -- 2.51.2