Maemo: Fix possible crash on stopping a run control.

The crash happens when the run control is stopped before a connection
has been established.

Task-number: QTCREATORBUG-3374
Reviewed-by: Tobias Hunger
This commit is contained in:
Christian Kandeler
2010-12-15 17:50:06 +01:00
committed by con
parent 7864ddcb28
commit 8d7d17dc78

View File

@@ -108,6 +108,11 @@ void MaemoSshRunner::stop()
if (m_state == PostRunCleaning || m_state == StopRequested if (m_state == PostRunCleaning || m_state == StopRequested
|| m_state == Inactive) || m_state == Inactive)
return; return;
if (m_state == Connecting) {
setState(Inactive);
emit remoteProcessFinished(InvalidExitCode);
return;
}
setState(StopRequested); setState(StopRequested);
cleanup(); cleanup();