outputpanemanager: fix potential crash in case of no outputpanes

Reviewed-by: dt
This commit is contained in:
hjk
2010-09-17 13:50:17 +02:00
parent fe23f8de88
commit 0468348a25

View File

@@ -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();
}