Fix error when removing chasm falling component on a terminating entity (#28471)
This commit is contained in:
@@ -24,8 +24,11 @@ public sealed class ChasmFallingVisualsSystem : EntitySystem
|
|||||||
|
|
||||||
private void OnComponentInit(EntityUid uid, ChasmFallingComponent component, ComponentInit args)
|
private void OnComponentInit(EntityUid uid, ChasmFallingComponent component, ComponentInit args)
|
||||||
{
|
{
|
||||||
if (!TryComp<SpriteComponent>(uid, out var sprite))
|
if (!TryComp<SpriteComponent>(uid, out var sprite) ||
|
||||||
|
TerminatingOrDeleted(uid))
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
component.OriginalScale = sprite.Scale;
|
component.OriginalScale = sprite.Scale;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user