Fixed #5515 (Crash on Preferences/Applications)

This commit is contained in:
Daniel Marjamäki 2014-05-02 07:16:10 +02:00
parent 7d762ca9f7
commit 935b37da0e
1 changed files with 5 additions and 3 deletions

View File

@ -175,9 +175,11 @@ void SettingsDialog::SaveSettingValues() const
SaveCheckboxValue(&settings, mUI.mEnableInconclusive, SETTINGS_INCONCLUSIVE_ERRORS);
SaveCheckboxValue(&settings, mUI.mShowErrorId, SETTINGS_SHOW_ERROR_ID);
QListWidgetItem *currentLang = mUI.mListLanguages->currentItem();
const QString langcode = currentLang->data(LangCodeRole).toString();
settings.setValue(SETTINGS_LANGUAGE, langcode);
const QListWidgetItem *currentLang = mUI.mListLanguages->currentItem();
if (currentLang) {
const QString langcode = currentLang->data(LangCodeRole).toString();
settings.setValue(SETTINGS_LANGUAGE, langcode);
}
const int count = mUI.mListIncludePaths->count();
QString includePaths;