ShipThrusterVariableSyncer: fix nre

This commit is contained in:
JohnCorby 2022-06-07 11:08:09 -07:00
parent 9a8d357b6d
commit 8d41e770b5

View File

@ -47,6 +47,11 @@ public class ShipThrusterVariableSyncer : NetworkBehaviour
}
}
private void GetFromShip() => AccelerationSyncer.Value = _thrusterModel.GetLocalAcceleration();
private void GetFromShip()
{
if (_thrusterModel)
{
AccelerationSyncer.Value = _thrusterModel.GetLocalAcceleration();
}
}
}