Fix possible race condition when closing the wizard

This commit is contained in:
Guillaume Meunier
2024-11-29 14:26:02 +01:00
parent 79b1924b45
commit 67f185d40d
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -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;
+4
View File
@@ -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;
}