Fix AI inventory deleted exc (#1810)
Was throwing during eating / drinking. Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -16,6 +16,9 @@ namespace Content.Server.AI.WorldState.States.Inventory
|
|||||||
{
|
{
|
||||||
foreach (var item in handsComponent.GetAllHeldItems())
|
foreach (var item in handsComponent.GetAllHeldItems())
|
||||||
{
|
{
|
||||||
|
if (item.Owner.Deleted)
|
||||||
|
continue;
|
||||||
|
|
||||||
yield return item.Owner;
|
yield return item.Owner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user