From 50200a59d4625d2c84afa9490045c6f97b64784b Mon Sep 17 00:00:00 2001 From: Jimmy <869159813@qq.com> Date: Thu, 28 Mar 2024 04:48:08 +0800 Subject: [PATCH] Bug fix: QGC will crashed when disconnecting a vehicle and then reconnecting with joystick connected. (#11260) --- src/Joystick/Joystick.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Joystick/Joystick.cc b/src/Joystick/Joystick.cc index 51dbd7e..970f6b9 100644 --- a/src/Joystick/Joystick.cc +++ b/src/Joystick/Joystick.cc @@ -1,4 +1,4 @@ -/**************************************************************************** +/**************************************************************************** * * (c) 2009-2020 QGROUNDCONTROL PROJECT * @@ -778,6 +778,7 @@ void Joystick::stopPolling(void) } _exitThread = true; } + _activeVehicle = nullptr; } void Joystick::setCalibration(int axis, Calibration_t& calibration)