Skip to content
Snippets Groups Projects
Commit b5ce5e90 authored by Daniel Teske's avatar Daniel Teske
Browse files

VCSBaseEditorParameterWidget::mapSetting cope with 0 pointer

Change-Id: I797488c6ace58a6f927fe3d528131682f1832de1
Reviewed-on: http://codereview.qt-project.org/6235


Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent d8ac419e
No related branches found
No related tags found
No related merge requests found
...@@ -195,7 +195,7 @@ void VCSBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, QString *sett ...@@ -195,7 +195,7 @@ void VCSBaseEditorParameterWidget::mapSetting(QComboBox *comboBox, QString *sett
d->m_settingMapping.insert(comboBox, Internal::SettingMappingData(setting)); d->m_settingMapping.insert(comboBox, Internal::SettingMappingData(setting));
if (setting) { if (setting) {
comboBox->blockSignals(true); comboBox->blockSignals(true);
const int itemIndex = comboBox->findData(*setting); const int itemIndex = setting ? comboBox->findData(*setting) : -1;
if (itemIndex != -1) if (itemIndex != -1)
comboBox->setCurrentIndex(itemIndex); comboBox->setCurrentIndex(itemIndex);
comboBox->blockSignals(false); comboBox->blockSignals(false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment