Fix storage exception (#21752)

This commit is contained in:
Leon Friedrich
2023-11-19 15:10:27 +13:00
committed by GitHub
parent 86c0a73c09
commit 8892e9e3ae

View 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)