Commit 0f026bd9 authored by BogDan Vatra's avatar BogDan Vatra Committed by Daniel Teske

Fix crash when pressing stop button

Change-Id: If1902153404c49516cf4e535655dbbb5a8135b1c
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent b7ba74d8
......@@ -71,7 +71,7 @@ void AndroidRunControl::start()
RunControl::StopResult AndroidRunControl::stop()
{
m_runner->stop();
m_runner->stop(true);
return StoppedSynchronously;
}
......
......@@ -68,7 +68,7 @@ AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig
AndroidRunner::~AndroidRunner()
{
stop();
stop(false);
}
void AndroidRunner::checkPID()
......@@ -232,7 +232,7 @@ void AndroidRunner::startLogcat()
emit remoteProcessStarted(5039);
}
void AndroidRunner::stop()
void AndroidRunner::stop(bool async)
{
QMutexLocker locker(&m_mutex);
m_adbLogcatProcess.terminate();
......@@ -240,7 +240,10 @@ void AndroidRunner::stop()
m_checkPIDTimer.stop();
if (m_processPID == -1)
return; // don't emit another signal
QtConcurrent::run(this, &AndroidRunner::asyncStop);
if (async)
QtConcurrent::run(this, &AndroidRunner::asyncStop);
else
asyncStop();
}
void AndroidRunner::asyncStop()
{
......
......@@ -55,7 +55,7 @@ public:
public slots:
void start();
void stop();
void stop(bool async);
signals:
void remoteProcessStarted(int gdbServerPort = -1, int qmlPort = -1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment