aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2010-03-26 11:01:47 +0100
committerdt <qtc-committer@nokia.com>2010-03-26 11:01:47 +0100
commit94d6b23da10e13a9dfdc5c13a06a458499c4bf16 (patch)
treedc39c2f44510bf359927734d955cbbfe2cdda4b0 /src/plugins/projectexplorer
parente388b389f4983bf25dbc980ded8dd063d598ea29 (diff)
Fix crash if the startup project changes to 0
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/projectwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp
index b1cd90e9d3..be88e017f0 100644
--- a/src/plugins/projectexplorer/projectwindow.cpp
+++ b/src/plugins/projectexplorer/projectwindow.cpp
@@ -360,7 +360,8 @@ void ProjectWindow::refreshProject()
void ProjectWindow::startupProjectChanged(ProjectExplorer::Project *p)
{
int index = m_tabIndexToProject.indexOf(p);
- m_tabWidget->setCurrentIndex(index);
+ if (index != -1)
+ m_tabWidget->setCurrentIndex(index);
}
void ProjectWindow::showProperties(int index, int subIndex)