Debugger: Work around race when running from command line

If the project was not parsed yet while the debugger is invoked,
activeRunConfiguration is still null, so the debugger doesn't start.

Task-number: QTCREATORBUG-18551
Change-Id: I02d77fa8fb1b2a3673da5cbf28ea36156498918c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-07-26 11:59:12 +03:00
committed by Orgad Shaneh
parent 6fccc45a92
commit e2e109c862

View File

@@ -623,7 +623,7 @@ RunConfiguration *dummyRunConfigForKit(ProjectExplorer::Kit *kit)
QTC_ASSERT(kit, return nullptr); // Caller needs to look for a suitable kit.
Project *project = SessionManager::startupProject();
Target *target = project ? project->target(kit) : nullptr;
if (!target) {
if (!target || !target->activeRunConfiguration()) {
project = new DummyProject;
target = project->createTarget(kit);
}