License Dialog: UI for legacy keys convertation
authorVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Wed, 28 Oct 2015 18:02:53 +0000 (21:02 +0300)
committerVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Wed, 28 Oct 2015 18:07:20 +0000 (21:07 +0300)
platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java

index 815ab1a7fc11ab34d33a2d45422c08dd9388214d..967d918e41b75a655bd4497ba0f099f9d52883e9 100644 (file)
@@ -1360,7 +1360,10 @@ public abstract class DialogWrapper {
     if (getValidationThreadToUse() == Alarm.ThreadToUse.SWING_THREAD) {
       // null if headless
       JRootPane rootPane = getRootPane();
-      myValidationAlarm.addRequest(validateRequest, myValidationDelay, rootPane == null ? ModalityState.current() : ModalityState.stateForComponent(rootPane));
+      myValidationAlarm.addRequest(validateRequest, myValidationDelay,
+                                   ApplicationManager.getApplication() == null
+                                   ? null
+                                   : rootPane == null ? ModalityState.current() : ModalityState.stateForComponent(rootPane));
     }
     else {
       myValidationAlarm.addRequest(validateRequest, myValidationDelay);