From 03f24449686875248e126cb9be4ac80ad6e7189f Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Wed, 3 Apr 2019 16:20:37 +0300 Subject: [PATCH] (7341d33ff) Fixed nullref exception if a fabricator finishes creating an item after the user has been removed. --- .../Source/Characters/Animation/Ragdoll.cs | 6 +++--- .../Source/Items/Components/Machines/Fabricator.cs | 9 ++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs b/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs index 0de17eaf4..bd9551511 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs @@ -110,7 +110,7 @@ namespace Barotrauma { get { - return collider[colliderIndex]; + return collider == null ? null : collider[colliderIndex]; } } @@ -122,10 +122,10 @@ namespace Barotrauma } set { - if (value == colliderIndex) return; + if (value == colliderIndex || collider == null) return; if (value >= collider.Count || value < 0) return; - if (collider[colliderIndex].height