Fix throw controller not handling deleted thrown stuff (#1097)

This commit is contained in:
Tyler Young
2020-06-09 06:29:06 -04:00
committed by GitHub
parent 4cb61b8693
commit bbbe8d2cb1

View File

@@ -33,7 +33,7 @@ namespace Content.Shared.Physics
public void StopThrow()
{
if (_component == null) return;
if (_component == null || _component.Owner.Deleted) return;
if (IoCManager.Resolve<IPhysicsManager>().IsWeightless(_component.Owner.Transform.GridPosition))
{
Timer.Spawn((int) (ThrowTime * 1000), StopThrow);