Improve authentication and logging.
[lgpl/argeo-commons.git] / org.argeo.eclipse.ui.rap / src / org / argeo / eclipse / ui / specific / UiContext.java
index 82b60612404b565875b3faeb51e0dc77bf810b2b..ebececf154cae3d0bed8b6f2d209761cf56c5ad7 100644 (file)
@@ -19,7 +19,8 @@ public class UiContext {
        }
 
        public static void setLocale(Locale locale) {
-               RWT.getUISession().setLocale(locale);
+               if (Display.getCurrent() != null)
+                       RWT.getUISession().setLocale(locale);
        }
 
        /** Can always be null */