summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2010-09-17 13:50:17 +0200
committerhjk <qtc-committer@nokia.com>2010-09-17 14:33:36 +0200
commit0468348a2520a3eed16f66a63b47b52f2ddb3345 (patch)
treeee48e66257eb959657b0e92c26a1638d252f9eb6
parentfe23f8de882b32e0c8df76990762d1640268a038 (diff)
downloadqt-creator-0468348a2520a3eed16f66a63b47b52f2ddb3345.tar.gz
outputpanemanager: fix potential crash in case of no outputpanes
Reviewed-by: dt
-rw-r--r--src/plugins/coreplugin/outputpanemanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/outputpanemanager.cpp b/src/plugins/coreplugin/outputpanemanager.cpp
index 8f175ddf2f..cfe3ab2d75 100644
--- a/src/plugins/coreplugin/outputpanemanager.cpp
+++ b/src/plugins/coreplugin/outputpanemanager.cpp
@@ -238,7 +238,7 @@ void OutputPaneManager::init()
begin = sorted.constBegin();
it = sorted.constEnd();
int shortcutNumber = 1;
- do {
+ while (it != begin) {
--it;
IOutputPane* outPane = it.value();
const int idx = m_outputWidgetPane->addWidget(outPane->outputWidget(this));
@@ -283,7 +283,7 @@ void OutputPaneManager::init()
m_widgetComboBox->addItem(outPane->displayName(), idx);
connect(cmd->action(), SIGNAL(triggered()), this, SLOT(shortcutTriggered()));
- } while (it != begin);
+ }
changePage();
}