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,6 +295,7 @@ void GeneralSettingsWidget::apply()
|
||||
setDpiPolicy(selectedPolicy);
|
||||
}
|
||||
currentIndex = m_codecBox->currentIndex();
|
||||
if (currentIndex != -1)
|
||||
setCodecForLocale(m_codecBox->itemText(currentIndex).toLocal8Bit());
|
||||
// Apply the new base color if accepted
|
||||
StyleHelper::setBaseColor(m_colorButton->color());
|
||||
|
Reference in New Issue
Block a user