Fix storage exception (#21752)
This commit is contained in:
@@ -390,6 +390,10 @@ public abstract class SharedStorageSystem : EntitySystem
|
|||||||
if (!Resolve(uid, ref storage, ref appearance, false))
|
if (!Resolve(uid, ref storage, ref appearance, false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
|
||||||
|
if (storage.Container == null)
|
||||||
|
return; // component hasn't yet been initialized.
|
||||||
|
|
||||||
int capacity;
|
int capacity;
|
||||||
int used;
|
int used;
|
||||||
if (storage.MaxSlots == null)
|
if (storage.MaxSlots == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user