Make more uids nullable (#5794)

This commit is contained in:
Leon Friedrich
2021-12-26 15:32:45 +13:00
committed by GitHub
parent 83114de0e4
commit afc3ae6335
42 changed files with 161 additions and 204 deletions

View File

@@ -37,9 +37,9 @@ namespace Content.Server.Storage.Components
if (lockers.Contains(Owner))
lockers.Remove(Owner);
var lockerEnt = _robustRandom.Pick(lockers);
if (lockers.Count == 0) return;
if (lockerEnt == null) return; // No valid lockers anywhere.
var lockerEnt = _robustRandom.Pick(lockers);
var locker = _entMan.GetComponent<EntityStorageComponent>(lockerEnt);