Fix possible race condition when closing the wizard
This commit is contained in:
@@ -90,6 +90,9 @@ private:
|
||||
|
||||
public:
|
||||
adb();
|
||||
adb(const adb &) = delete;
|
||||
adb & operator=(const adb &) = delete;
|
||||
|
||||
const std::vector<adb::device> & devices() const
|
||||
{
|
||||
return _android_devices;
|
||||
|
||||
@@ -460,6 +460,10 @@ wizard::~wizard()
|
||||
{
|
||||
server->disable_pairing();
|
||||
|
||||
// android_devices_changed can be emitted when adb_service is destroyed, disconnect it before destroying
|
||||
// the GUI
|
||||
disconnect(&adb_service, &adb::android_devices_changed, this, &wizard::on_android_device_list_changed);
|
||||
|
||||
delete ui;
|
||||
ui = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user