]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix error when removing chasm falling component on a terminating entity (#28471)
authorDrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
Sat, 1 Jun 2024 19:00:31 +0000 (12:00 -0700)
committerGitHub <noreply@github.com>
Sat, 1 Jun 2024 19:00:31 +0000 (15:00 -0400)
Content.Client/Chasm/ChasmFallingVisualsSystem.cs

index 4b04aa9dd713f68f06d4c285e86c0e37b8eb8c29..ddcd509cb33622dae974eff794c0e848f0706fb2 100644 (file)
@@ -24,8 +24,11 @@ public sealed class ChasmFallingVisualsSystem : EntitySystem
 
     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;
+        }
 
         component.OriginalScale = sprite.Scale;