forked from qt-creator/qt-creator
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:
@@ -170,8 +170,8 @@ 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);
|
||||||
}
|
}
|
||||||
if (mode == NormalRunMode)
|
if (mode == NormalRunMode)
|
||||||
|
|||||||
Reference in New Issue
Block a user