From a46e71d0b6fffde5684446e228180547b81e8b5b Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Date: Fri, 31 Jul 2009 09:07:46 +0200
Subject: [PATCH] Debugger: Fixed assert when debugging a core-file without
 project.

Task-number: 256215
---
 src/plugins/debugger/debuggerplugin.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 7c122304faf..de36dfeb45f 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1271,6 +1271,8 @@ void DebuggerPlugin::attachCore()
     sp->executable = dlg.executableFile();
     sp->coreFile = dlg.coreFile();
     QSharedPointer<RunConfiguration> rc = activeRunConfiguration();
+    if (rc.isNull())
+        rc = DebuggerRunner::createDefaultRunConfiguration();
     if (RunControl *runControl = m_debuggerRunner
             ->run(rc, ProjectExplorer::Constants::DEBUGMODE, sp, AttachCore))
         runControl->start();
@@ -1303,6 +1305,8 @@ void DebuggerPlugin::startRemoteApplication()
         sp->serverStartScript = dlg.serverStartScript();
 
     QSharedPointer<RunConfiguration> rc = activeRunConfiguration();
+    if (rc.isNull())
+        rc = DebuggerRunner::createDefaultRunConfiguration();
     if (RunControl *runControl = m_debuggerRunner
             ->run(rc, ProjectExplorer::Constants::DEBUGMODE, sp, StartRemote))
         runControl->start();
@@ -1336,6 +1340,8 @@ void DebuggerPlugin::attachRemoteTcf()
         sp->serverStartScript = dlg.serverStartScript();
 
     QSharedPointer<RunConfiguration> rc = activeRunConfiguration();
+    if (rc.isNull())
+        rc = DebuggerRunner::createDefaultRunConfiguration();
     if (RunControl *runControl = m_debuggerRunner
             ->run(rc, ProjectExplorer::Constants::DEBUGMODE, sp, AttachTcf))
         runControl->start();
-- 
GitLab