Skip to content

Commit 60a4fd8

Browse files
committed
Fixed potential nil dereference with mod actors
1 parent 458847e commit 60a4fd8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Data/Missions.rte/Activities/DecisionDay.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,12 @@ function DecisionDay:StartNewGame()
419419
deadBody.Team = self.aiTeam;
420420
deadBody.Pos = box.Center;
421421
deadBody.Vel.X = -2;
422-
deadBody.DeathSound.Volume = 0;
423-
deadBody.PainSound.Volume = 0;
422+
if deadBody.DeathSound then
423+
deadBody.DeathSound.Volume = 0;
424+
end
425+
if deadBody.PainSound then
426+
deadBody.PainSound.Volume = 0;
427+
end
424428
deadBody.HFlipped = true;
425429
deadBody.Health = 0;
426430
MovableMan:AddActor(deadBody);

0 commit comments

Comments
 (0)