mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-159850 NPE on welcome screen (Import Project)
This commit is contained in:
@@ -31,7 +31,8 @@ import java.awt.*;
|
||||
public class OwnerOptional {
|
||||
|
||||
@NotNull
|
||||
private static Window findOwnerByComponent(@NotNull Component component) {
|
||||
private static Window findOwnerByComponent(Component component) {
|
||||
if (component == null) component = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow();
|
||||
return (component instanceof Window) ? (Window) component : SwingUtilities.getWindowAncestor(component);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user