From dbeb36b03e8bfc14ebb039da1238d2cbcbcee5c2 Mon Sep 17 00:00:00 2001
From: Robert Loehning <robert.loehning@digia.com>
Date: Mon, 18 Mar 2013 17:28:29 +0100
Subject: [PATCH] debugger: Avoid failing assert in theId()

Change-Id: Ic5895a6c8f8402d4abf0d66ab334caa5815de7dc
Reviewed-by: hjk <hjk121@nokiamail.com>
---
 src/plugins/debugger/debuggerplugin.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 0bee5f811b8..6c19122e103 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1619,7 +1619,9 @@ void DebuggerPluginPrivate::attachCore()
 {
     AttachCoreDialog dlg(mainWindow());
 
-    dlg.setKitId(Id(configValue(_("LastExternalKit")).toString()));
+    const QString lastExternalKit = configValue(_("LastExternalKit")).toString();
+    if (!lastExternalKit.isEmpty())
+        dlg.setKitId(Id(lastExternalKit));
     dlg.setLocalExecutableFile(configValue(_("LastExternalExecutableFile")).toString());
     dlg.setLocalCoreFile(configValue(_("LastLocalCoreFile")).toString());
     dlg.setRemoteCoreFile(configValue(_("LastRemoteCoreFile")).toString());
-- 
GitLab