forked from qt-creator/qt-creator
Core: fix rare crash in GeneralSettingsWidget::apply()
The codec box might not contain any items maybe the list failed to populate found in https://the-qt-company-00.sentry.io/issues/6367744991 Pick-to: qds/4.7 Change-Id: I46acf97749d148edc45bd33d31815d7f7e96942b Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -295,7 +295,8 @@ void GeneralSettingsWidget::apply()
|
|||||||
setDpiPolicy(selectedPolicy);
|
setDpiPolicy(selectedPolicy);
|
||||||
}
|
}
|
||||||
currentIndex = m_codecBox->currentIndex();
|
currentIndex = m_codecBox->currentIndex();
|
||||||
setCodecForLocale(m_codecBox->itemText(currentIndex).toLocal8Bit());
|
if (currentIndex != -1)
|
||||||
|
setCodecForLocale(m_codecBox->itemText(currentIndex).toLocal8Bit());
|
||||||
// Apply the new base color if accepted
|
// Apply the new base color if accepted
|
||||||
StyleHelper::setBaseColor(m_colorButton->color());
|
StyleHelper::setBaseColor(m_colorButton->color());
|
||||||
m_themeChooser->apply();
|
m_themeChooser->apply();
|
||||||
|
Reference in New Issue
Block a user