Fix possible race condition when closing the wizard
This commit is contained in:
@@ -90,6 +90,9 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
adb();
|
adb();
|
||||||
|
adb(const adb &) = delete;
|
||||||
|
adb & operator=(const adb &) = delete;
|
||||||
|
|
||||||
const std::vector<adb::device> & devices() const
|
const std::vector<adb::device> & devices() const
|
||||||
{
|
{
|
||||||
return _android_devices;
|
return _android_devices;
|
||||||
|
|||||||
@@ -460,6 +460,10 @@ wizard::~wizard()
|
|||||||
{
|
{
|
||||||
server->disable_pairing();
|
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;
|
delete ui;
|
||||||
ui = nullptr;
|
ui = nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user