aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2022-02-23 09:47:42 +0100
committerEike Ziller <eike.ziller@qt.io>2022-02-23 09:03:16 +0000
commit477ebd3b610a127ed3e914508455677c832f17f4 (patch)
treed7e3a850768a535ad420cca3695169569f302828
parent3efec2b887483cc4668805a0da6752f4692985f7 (diff)
Android: Fix crash on exitv7.0.0-beta2
m_adbDeviceWatcherProcess can be 0 if Android is not set up. Amends: c43ba1ae329937db62c4824311fe017b68b6033f Change-Id: I90aef197c098f279a6bd3adb0485df74b8be1961 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/plugins/android/androiddevice.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/android/androiddevice.cpp b/src/plugins/android/androiddevice.cpp
index b7927d0aa8..f6e036b1d6 100644
--- a/src/plugins/android/androiddevice.cpp
+++ b/src/plugins/android/androiddevice.cpp
@@ -753,9 +753,11 @@ AndroidDeviceManager::AndroidDeviceManager(QObject *parent)
m_avdManager(m_androidConfig)
{
connect(qApp, &QCoreApplication::aboutToQuit, this, [this]() {
- m_adbDeviceWatcherProcess->terminate();
- m_adbDeviceWatcherProcess->waitForFinished();
- m_adbDeviceWatcherProcess.reset();
+ if (m_adbDeviceWatcherProcess) {
+ m_adbDeviceWatcherProcess->terminate();
+ m_adbDeviceWatcherProcess->waitForFinished();
+ m_adbDeviceWatcherProcess.reset();
+ }
m_avdsFutureWatcher.waitForFinished();
m_removeAvdFutureWatcher.waitForFinished();
});