From b251a49cbd604dcfb297bfec41ba5e0d22c68ba2 Mon Sep 17 00:00:00 2001 From: siimav Date: Sat, 29 Jul 2023 15:11:05 +0300 Subject: [PATCH] Fix possible exception in ModuleROTank.OnFixedUpdate Closes #18 --- Source/ROLib/Modules/ModuleROTank_KorolevCross.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ROLib/Modules/ModuleROTank_KorolevCross.cs b/Source/ROLib/Modules/ModuleROTank_KorolevCross.cs index 6ea4b78..8b6327f 100644 --- a/Source/ROLib/Modules/ModuleROTank_KorolevCross.cs +++ b/Source/ROLib/Modules/ModuleROTank_KorolevCross.cs @@ -136,7 +136,7 @@ private void CreateJoint() public override void OnFixedUpdate() { - if (!isFinished && decoupler.isDecoupled) + if (!isFinished && decoupler != null && decoupler.isDecoupled) { float mass = GetPartDryMassRecursive(part);