workaround for endless loop in default feature tree
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / preference / PreferencesUtil.java
index cbe21592a1664fe8b0f678ed20c7f005040c3b46..6b995400ed69bfa447205927c3306d6248829f62 100644 (file)
@@ -957,8 +957,15 @@ public class PreferencesUtil implements IPreferenceKeys {
        public static FeatureTree getDefaultFeatureTreeForTextualDescription() {
                String uuidString = getStringValue(
                                FEATURE_TREE_DEFAULT_TEXT);
-               return CdmUtils.isEmpty(uuidString) ? null : CdmStore.getService(
-                               IFeatureTreeService.class).load(UUID.fromString(uuidString));
+               if (uuidString == null) {
+            return null;
+        }
+               FeatureTree tree = CdmStore.getService(
+                       IFeatureTreeService.class).load(UUID.fromString(uuidString));
+               if (tree.getId() == 0) {
+            return null;
+        }
+               return tree;
        }
 
        /**