From 2e0812bffdc489650d982f3915d89826507a2fb8 Mon Sep 17 00:00:00 2001 From: Fawzi Mohamed Date: Mon, 24 Feb 2014 14:31:35 +0100 Subject: [PATCH] ios: fix access of deleted run control Change-Id: I8c65f5d9e3480b5c60157cd46da3ef57a63cf32c Reviewed-by: Kai Koehne Reviewed-by: Fawzi Mohamed --- src/plugins/ios/iosrunfactories.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/ios/iosrunfactories.cpp b/src/plugins/ios/iosrunfactories.cpp index 760d26d13dc..9af86e8e281 100644 --- a/src/plugins/ios/iosrunfactories.cpp +++ b/src/plugins/ios/iosrunfactories.cpp @@ -170,8 +170,8 @@ RunControl *IosRunControlFactory::create(RunConfiguration *runConfig, 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. if (m_activeRunControls.contains(devId)) { - QPointer activeRunControl = m_activeRunControls[devId]; - activeRunControl->stop(); + if (QPointer activeRunControl = m_activeRunControls[devId]) + activeRunControl->stop(); m_activeRunControls.remove(devId); } if (mode == NormalRunMode)