- defaultLocale = Activator.getNodeState().getDefaultLocale();
- List<Locale> locales = Activator.getNodeState().getLocales();
- if (locales != null)
- localeChoice = new LocaleChoice(locales, defaultLocale);
+ NodeState nodeState = Activator.getNodeState();
+ if (nodeState != null) {
+ defaultLocale = nodeState.getDefaultLocale();
+ List<Locale> locales = nodeState.getLocales();
+ if (locales != null)
+ localeChoice = new LocaleChoice(locales, defaultLocale);
+ } else {
+ defaultLocale = Locale.getDefault();
+ }