From 8d41e770b5bda434e5e1e08a83940c3e53549f8b Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Tue, 7 Jun 2022 11:08:09 -0700 Subject: [PATCH] ShipThrusterVariableSyncer: fix nre --- QSB/ShipSync/ShipThrusterVariableSyncer.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/QSB/ShipSync/ShipThrusterVariableSyncer.cs b/QSB/ShipSync/ShipThrusterVariableSyncer.cs index 585c8ddd..e2fefe8b 100644 --- a/QSB/ShipSync/ShipThrusterVariableSyncer.cs +++ b/QSB/ShipSync/ShipThrusterVariableSyncer.cs @@ -47,6 +47,11 @@ public class ShipThrusterVariableSyncer : NetworkBehaviour } } - private void GetFromShip() => AccelerationSyncer.Value = _thrusterModel.GetLocalAcceleration(); + private void GetFromShip() + { + if (_thrusterModel) + { + AccelerationSyncer.Value = _thrusterModel.GetLocalAcceleration(); + } + } } - \ No newline at end of file