mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
NPE
This commit is contained in:
@@ -814,7 +814,7 @@ public class AbstractPopup implements JBPopup {
|
||||
}
|
||||
|
||||
private IdeFocusManager getFocusManager() {
|
||||
return IdeFocusManager.getInstance(myProject);
|
||||
return myProject == null ? null : IdeFocusManager.getInstance(myProject);
|
||||
}
|
||||
|
||||
private static JComponent getTargetComponent(Component aComponent) {
|
||||
@@ -908,7 +908,13 @@ public class AbstractPopup implements JBPopup {
|
||||
resetWindow();
|
||||
|
||||
if (myFinalRunnable != null) {
|
||||
getFocusManager().doWhenFocusSettlesDown(myFinalRunnable);
|
||||
IdeFocusManager focusManager = getFocusManager();
|
||||
if (focusManager != null) {
|
||||
focusManager.doWhenFocusSettlesDown(myFinalRunnable);
|
||||
}
|
||||
else {
|
||||
myFinalRunnable.run();
|
||||
}
|
||||
myFinalRunnable = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user