fix NPE in StoreUtil
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / preference / PreferencesUtil.java
index 04771f9248b9bc6ff0f6eccf0bea08b461f7010e..2ae5e0812d7d1ae663588614830833868a51ff06 100644 (file)
@@ -240,7 +240,7 @@ public class PreferencesUtil implements IPreferenceKeys {
                 prefValue = getPreferenceStore().
                         getString(name);
             }
-            if (StringUtils.isBlank(prefValue)){
+            if (StringUtils.isBlank(prefValue) || (pref == null && !override)){
                 IPreferencePredicate pred = PreferencePredicate.getByKey(name);
                 if (pred != null){
                     if (pred.getDefaultValue() instanceof String){