Commit 45f15f0e authored by hjk's avatar hjk
Browse files

debugger: handle switching to "no project" gracefully.

parent 0982e077
......@@ -1643,11 +1643,13 @@ bool DebuggerPluginPrivate::initialize(const QStringList &arguments, QString *er
void DebuggerPluginPrivate::onCurrentProjectChanged(ProjectExplorer::Project *project)
{
QTC_ASSERT(project, return);
ProjectExplorer::Target *target = project->activeTarget();
QTC_ASSERT(target, return);
ProjectExplorer::RunConfiguration *activeRc = target->activeRunConfiguration();
QTC_ASSERT(activeRc, return);
ProjectExplorer::RunConfiguration *activeRc = 0;
if (project) {
ProjectExplorer::Target *target = project->activeTarget();
QTC_ASSERT(target, return);
activeRc = target->activeRunConfiguration();
QTC_ASSERT(activeRc, /**/);
}
for (int i = 0, n = m_snapshotHandler->size(); i != n; ++i) {
DebuggerRunControl *runControl = m_snapshotHandler->at(i);
RunConfiguration *rc = runControl->runConfiguration();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment