From 5c8566709d0f78d39f90905fb5f981585a57d99a Mon Sep 17 00:00:00 2001 From: dt <qtc-committer@nokia.com> Date: Mon, 27 Jul 2009 15:22:03 +0200 Subject: [PATCH] Break a infinite loop. Removing the last project did set startupproject to zero and unloaded the project. Thus the check that the project for the current item and the startup project are both null and the same. --- src/plugins/projectexplorer/projectwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index 6636498e086..6309ae446c6 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -310,12 +310,14 @@ void ProjectWindow::handleCurrentItemChanged(QTreeWidgetItem *current) void ProjectWindow::handleItem(QTreeWidgetItem *item, int column) { - if (!item || column != 1) // startup project return; const QString path = item->data(2, Qt::UserRole).toString(); Project *project = findProject(path); + // Project no longer exists + if (!project) + return; if (!(item->checkState(1) == Qt::Checked)) { // is now unchecked if (m_session->startupProject() == project) { item->setCheckState(1, Qt::Checked); // uncheck not supported -- GitLab