From 27594dbcb7f3a1388bb399deef4f96ca0e449e38 Mon Sep 17 00:00:00 2001 From: "Maxim.Mossienko" Date: Tue, 9 Jun 2015 13:36:08 +0200 Subject: [PATCH] be prepared for null status bar (IDEA-141222) --- .../com/intellij/ide/actionMacro/ActionMacroManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/actionMacro/ActionMacroManager.java b/platform/platform-impl/src/com/intellij/ide/actionMacro/ActionMacroManager.java index 29d567145512..388c22560abf 100644 --- a/platform/platform-impl/src/com/intellij/ide/actionMacro/ActionMacroManager.java +++ b/platform/platform-impl/src/com/intellij/ide/actionMacro/ActionMacroManager.java @@ -399,11 +399,12 @@ public class ActionMacroManager implements ExportableApplicationComponent, Named public void messageEdt(PlaybackContext context, String text, Type type) { if (type == Type.message || type == Type.error) { + StatusBar statusBar = frame.getStatusBar(); if (context != null) { - frame.getStatusBar().setInfo("Line " + context.getCurrentLine() + ": " + text); + if (statusBar != null) statusBar.setInfo("Line " + context.getCurrentLine() + ": " + text); } else { - frame.getStatusBar().setInfo(text); + if (statusBar != null) statusBar.setInfo(text); } } } @@ -414,7 +415,8 @@ public class ActionMacroManager implements ExportableApplicationComponent, Named runner.run() .doWhenDone(new Runnable() { public void run() { - frame.getStatusBar().setInfo("Script execution finished"); + StatusBar statusBar = frame.getStatusBar(); + statusBar.setInfo("Script execution finished"); } }) .doWhenProcessed(new Runnable() {