From 935b37da0e017a48b73ed75422c1f81f967cdab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 2 May 2014 07:16:10 +0200 Subject: [PATCH] Fixed #5515 (Crash on Preferences/Applications) --- gui/settingsdialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/settingsdialog.cpp b/gui/settingsdialog.cpp index 7ccbf697a..2142fab5a 100644 --- a/gui/settingsdialog.cpp +++ b/gui/settingsdialog.cpp @@ -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;