Fix for null exception upon start.

This commit is contained in:
Sebastian Broberg
2016-03-03 20:35:07 +01:00
parent f97ff4ca46
commit 63e5e75201

View File

@@ -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);
}