VCSBaseEditorParameterWidget::mapSetting cope with 0 pointer

Change-Id: I797488c6ace58a6f927fe3d528131682f1832de1
Reviewed-on: http://codereview.qt-project.org/6235
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Daniel Teske
2011-10-06 13:13:01 +02:00
parent d8ac419ef5
commit b5ce5e9086

View File

@@ -195,7 +195,7 @@ void VCSBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, QString *sett
d->m_settingMapping.insert(comboBox, Internal::SettingMappingData(setting));
if (setting) {
comboBox->blockSignals(true);
const int itemIndex = comboBox->findData(*setting);
const int itemIndex = setting ? comboBox->findData(*setting) : -1;
if (itemIndex != -1)
comboBox->setCurrentIndex(itemIndex);
comboBox->blockSignals(false);