don't NPE in tests

This commit is contained in:
peter
2011-06-01 08:29:13 +02:00
parent a2b924ddc0
commit 9bd7e35085
@@ -120,7 +120,13 @@ public class EventLog implements Notifications {
}
view.print("\n", ConsoleViewContentType.NORMAL_OUTPUT);
((StatusBarEx)WindowManager.getInstance().getIdeFrame(project).getStatusBar()).setLogMessage(mainText);
final IdeFrame frame = WindowManager.getInstance().getIdeFrame(project);
if (frame != null) {
final StatusBar statusBar = frame.getStatusBar();
if (statusBar != null) {
((StatusBarEx)statusBar).setLogMessage(mainText);
}
}
}
private static int eolIndex(String mainText) {