From 6ee2dc044c49479aa9080bceafeb4c92c0497eba Mon Sep 17 00:00:00 2001 From: "Dmitry.Krasilschikov" Date: Wed, 23 Jan 2019 20:12:29 +0200 Subject: [PATCH] IDEA-200666 fix UOE from tests --- .../com/intellij/ide/actions/RecentLocationManager.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/actions/RecentLocationManager.java b/platform/platform-impl/src/com/intellij/ide/actions/RecentLocationManager.java index 8c1751d930cf..35f2d0dca1a5 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/RecentLocationManager.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/RecentLocationManager.java @@ -154,8 +154,13 @@ public class RecentLocationManager implements ProjectComponent { @Nullable private static Editor findEditor(@NotNull Project project, @NotNull PlaceInfo changePlace) { - JComponent component = FileEditorManagerEx.getInstanceEx(project).getPreferredFocusedComponent(); - if (component == null || !component.isShowing() || !(component instanceof EditorComponentImpl)) { + try { + JComponent component = FileEditorManagerEx.getInstanceEx(project).getPreferredFocusedComponent(); + if (component == null || !component.isShowing() || !(component instanceof EditorComponentImpl)) { + return null; + } + } + catch (Exception e) { return null; }