#5306 Use default language if preferred language is null
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 19 Oct 2015 12:42:00 +0000 (14:42 +0200)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 19 Oct 2015 12:44:33 +0000 (14:44 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/MultilanguageTextElement.java

index 4c4578719796d02838d45ea76fde4f4d018e27e1..7f040a8680ade1770d7d2e0efcbd235db569e885 100644 (file)
@@ -214,8 +214,9 @@ public class MultilanguageTextElement extends AbstractCdmFormElement implements
                                                                .getDefaultLanguage() }));
 
                element_languageString.setLanguageString(preferredLanguageString);
                                                                .getDefaultLanguage() }));
 
                element_languageString.setLanguageString(preferredLanguageString);
+
                if (PreferencesUtil.isMultilanguageTextEditingCapability()) {
                if (PreferencesUtil.isMultilanguageTextEditingCapability()) {
-                       combo_language.setSelection(preferredLanguageString.getLanguage());
+                       combo_language.setSelection(preferredLanguageString == null?CdmStore.getDefaultLanguage():preferredLanguageString.getLanguage());
                        button.setEnabled(true);
                }
        }
                        button.setEnabled(true);
                }
        }