Merge pull request #5369 from dmitrio95/workspace-local-prefs-crash
Fix a crash on reading a workspace with non-existing preferences
This commit is contained in:
commit
6c0bef1256
1 changed files with 1 additions and 1 deletions
|
@ -227,7 +227,7 @@ QVariant Preferences::defaultValue(const QString key) const
|
||||||
{
|
{
|
||||||
checkIfKeyExists(key);
|
checkIfKeyExists(key);
|
||||||
Preference* pref = _allPreferences.value(key);
|
Preference* pref = _allPreferences.value(key);
|
||||||
return pref->defaultValue();
|
return pref ? pref->defaultValue() : QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
QSettings* Preferences::settings() const
|
QSettings* Preferences::settings() const
|
||||||
|
|
Loading…
Reference in a new issue