mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-200666 fix UOE from tests
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user