Skip to content

Commit

Permalink
npe fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Mar 28, 2023
1 parent 6b6a0a5 commit 595816c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ protected LocaleDescriptor getSelectedLocaleDescriptor() {
protected void changeLocale(AjaxRequestTarget target, LocaleDescriptor descriptor) {
LOGGER.info("Changing locale to {}.", descriptor.getLocale());
getSession().setLocale(descriptor.getLocale());
AuthUtil.getPrincipalUser().setPreferredLocale(descriptor.getLocale());
if (AuthUtil.getPrincipalUser() != null) {
AuthUtil.getPrincipalUser().setPreferredLocale(descriptor.getLocale());
}
WebComponentUtil.getCompiledGuiProfile().setLocale(descriptor.getLocale());

target.add(getPage());
Expand Down

0 comments on commit 595816c

Please sign in to comment.