ref #5969: check for db connection before ty to read the preferred nomenclatural...
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / preference / PreferencesUtil.java
index 00bbfff9643a3ed14a5f8ae878f4de1f5581c96e..e7eb2a4d1479a76c7ed3f1ebf670931871aadc13 100644 (file)
@@ -114,6 +114,9 @@ public class PreferencesUtil implements IPreferenceKeys {
                controller = CdmStore.getCurrentApplicationConfiguration();
                PrefKey key = CdmPreference.NewKey(PreferenceSubject.NewDatabaseInstance(), PreferencePredicate.NomenclaturalCode);
                CdmPreference preference = null;
+               if (controller == null){
+                       return;
+               }
                if (preferredCode == null){
                        preference = controller.getPreferenceService().find(key);
                        if (preference == null){