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){