diff options
author | hjk <qtc-committer@nokia.com> | 2010-09-17 13:50:17 +0200 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2010-09-17 14:33:36 +0200 |
commit | 0468348a2520a3eed16f66a63b47b52f2ddb3345 (patch) | |
tree | ee48e66257eb959657b0e92c26a1638d252f9eb6 | |
parent | fe23f8de882b32e0c8df76990762d1640268a038 (diff) | |
download | qt-creator-0468348a2520a3eed16f66a63b47b52f2ddb3345.tar.gz |
outputpanemanager: fix potential crash in case of no outputpanes
Reviewed-by: dt
-rw-r--r-- | src/plugins/coreplugin/outputpanemanager.cpp | 4 |
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(); } |