ios: fix access of deleted run control

Change-Id: I8c65f5d9e3480b5c60157cd46da3ef57a63cf32c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Fawzi Mohamed
2014-02-24 14:31:35 +01:00
parent 12c3b9e489
commit 2e0812bffd

View File

@@ -170,7 +170,7 @@ RunControl *IosRunControlFactory::create(RunConfiguration *runConfig,
Core::Id devId = ProjectExplorer::DeviceKitInformation::deviceId(rc->target()->kit()); Core::Id devId = ProjectExplorer::DeviceKitInformation::deviceId(rc->target()->kit());
// The device can only run an application at a time, if an app is running stop it. // The device can only run an application at a time, if an app is running stop it.
if (m_activeRunControls.contains(devId)) { if (m_activeRunControls.contains(devId)) {
QPointer<ProjectExplorer::RunControl> activeRunControl = m_activeRunControls[devId]; if (QPointer<ProjectExplorer::RunControl> activeRunControl = m_activeRunControls[devId])
activeRunControl->stop(); activeRunControl->stop();
m_activeRunControls.remove(devId); m_activeRunControls.remove(devId);
} }