Fixed null reference exception if a statuseffect removes an item when a round is not running. Closes #385

This commit is contained in:
Joonas Rikkonen
2018-04-24 18:02:53 +03:00
parent 91d6c7b91f
commit 8cf26e2d7f
@@ -378,7 +378,7 @@ namespace Barotrauma
{ {
foreach (Item item in targets.FindAll(t => t is Item).Cast<Item>()) foreach (Item item in targets.FindAll(t => t is Item).Cast<Item>())
{ {
Entity.Spawner.AddToRemoveQueue(item); Entity.Spawner?.AddToRemoveQueue(item);
} }
} }