From 63e5e75201fe0025b0dc953f50d1305c5d82fb38 Mon Sep 17 00:00:00 2001 From: Sebastian Broberg Date: Thu, 3 Mar 2016 20:35:07 +0100 Subject: [PATCH] Fix for null exception upon start. --- Subsurface/Source/Items/Item.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Subsurface/Source/Items/Item.cs b/Subsurface/Source/Items/Item.cs index 846f53cc2..266315d5b 100644 --- a/Subsurface/Source/Items/Item.cs +++ b/Subsurface/Source/Items/Item.cs @@ -642,7 +642,8 @@ namespace Barotrauma body.ResetDynamics(); } body.ApplyForce(buoyancy - body.LinearVelocity * volume); - CurrentHull.HandleItems(deltaTime, this); + if(CurrentHull != null) + CurrentHull.HandleItems(deltaTime, this); //apply simple angular drag body.ApplyTorque(body.AngularVelocity * volume * -0.05f); }