EA-71679 - NPE: XDebuggerEvaluateActionHandler.showDialog
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Mon, 10 Aug 2015 14:22:06 +0000 (17:22 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Mon, 10 Aug 2015 14:23:29 +0000 (17:23 +0300)
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/handlers/XDebuggerEvaluateActionHandler.java

index 92e353b9346c004d54068263579a77949ef24b78..9afff78ef6e55f5f3b4d67b45b3ba398c7b17478 100644 (file)
@@ -79,12 +79,14 @@ public class XDebuggerEvaluateActionHandler extends XDebuggerActionHandler {
         value.calculateEvaluationExpression().done(new Consumer<XExpression>() {
           @Override
           public void consume(final XExpression expression) {
         value.calculateEvaluationExpression().done(new Consumer<XExpression>() {
           @Override
           public void consume(final XExpression expression) {
-            AppUIUtil.invokeOnEdt(new Runnable() {
-              @Override
-              public void run() {
-                showDialog(session, file, editorsProvider, stackFrame, evaluator, expression);
-              }
-            });
+            if (expression != null) {
+              AppUIUtil.invokeOnEdt(new Runnable() {
+                @Override
+                public void run() {
+                  showDialog(session, file, editorsProvider, stackFrame, evaluator, expression);
+                }
+              });
+            }
           }
         });
         return;
           }
         });
         return;
@@ -100,7 +102,7 @@ public class XDebuggerEvaluateActionHandler extends XDebuggerActionHandler {
                                  XDebuggerEditorsProvider editorsProvider,
                                  XStackFrame stackFrame,
                                  XDebuggerEvaluator evaluator,
                                  XDebuggerEditorsProvider editorsProvider,
                                  XStackFrame stackFrame,
                                  XDebuggerEvaluator evaluator,
-                                 XExpression expression) {
+                                 @NotNull XExpression expression) {
     if (expression.getLanguage() == null) {
       Language language = null;
       if (stackFrame != null) {
     if (expression.getLanguage() == null) {
       Language language = null;
       if (stackFrame != null) {