mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
CPP-39460 fix NPE during editor opening
(cherry picked from commit f3626178dfb79043241a03f50b5a81fe793a403a) IJ-MR-139213 GitOrigin-RevId: 51180a1f8ebfb01b801019e57e1051f089287f4e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
265244387a
commit
32a73fce42
@@ -1091,7 +1091,11 @@ class EditorWindow internal constructor(
|
||||
// don't check focus in unit test mode
|
||||
if (!ApplicationManager.getApplication().isUnitTestMode) {
|
||||
val owner = IdeFocusManager.getInstance(owner.manager.project).focusOwner
|
||||
if (owner == null || !SwingUtilities.isDescendingFrom(owner, composite.selectedEditor!!.component)) {
|
||||
if (owner == null) {
|
||||
return false
|
||||
}
|
||||
val component = composite.selectedEditor?.component
|
||||
if (component == null || !SwingUtilities.isDescendingFrom(owner, component)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user