diff --git a/src/Joystick/Joystick.cc b/src/Joystick/Joystick.cc index f210a80a785..c44274119e5 100644 --- a/src/Joystick/Joystick.cc +++ b/src/Joystick/Joystick.cc @@ -569,7 +569,7 @@ void Joystick::_handleAxis() _rgAxisValues[axisIndex] = newAxisValue; emit rawAxisValueChanged(axisIndex, newAxisValue); } - if (_activeVehicle->joystickEnabled() && !_calibrationMode && _calibrated) { + if (_activeVehicle && _activeVehicle->joystickEnabled() && !_calibrationMode && _calibrated) { int axis = _rgFunctionAxis[rollFunction]; float roll = _adjustRange(_rgAxisValues[axis], _rgCalibration[axis], _deadband);