mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix NPE
This commit is contained in:
@@ -812,7 +812,10 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable {
|
||||
|
||||
Component result = null;
|
||||
if (!ApplicationManager.getApplication().isActive()) {
|
||||
result = myLastFocusedAtDeactivation.get(getLastFocusedFrame()).get();
|
||||
final WeakReference<Component> ref = myLastFocusedAtDeactivation.get(getLastFocusedFrame());
|
||||
if (ref != null) {
|
||||
result = ref.get();
|
||||
}
|
||||
} else if (myRunContext != null) {
|
||||
result = (Component)myRunContext.getData(PlatformDataKeys.CONTEXT_COMPONENT.getName());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user