From e8b530fdee0a6da58fd1955d036b6b8885c95093 Mon Sep 17 00:00:00 2001 From: stilnat Date: Sun, 20 Aug 2023 10:12:14 +0200 Subject: [PATCH] fix null ref --- Assets/Scripts/SS3D/Systems/Health/Bodypart.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/SS3D/Systems/Health/Bodypart.cs b/Assets/Scripts/SS3D/Systems/Health/Bodypart.cs index 44e7fde088..040948e71e 100644 --- a/Assets/Scripts/SS3D/Systems/Health/Bodypart.cs +++ b/Assets/Scripts/SS3D/Systems/Health/Bodypart.cs @@ -308,7 +308,7 @@ protected virtual void RemoveSingleBodyPart() { HideSeveredBodyPart(); DetachBodyPart(); - _parentBodyPart._childBodyParts.Remove(this); + _parentBodyPart?._childBodyParts.Remove(this); _parentBodyPart = null; }