IDEA-200666 fix UOE from tests

This commit is contained in:
Dmitry.Krasilschikov
2019-01-23 20:12:52 +02:00
parent e4ee82fd98
commit 6ee2dc044c
@@ -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;
}