Skip to content

Commit 4834d60

Browse files
committed
Fix NPE in ModelServiceImpl#bringToTop
ModelService#getTopLevelWindowFor is allowed to return null in some cases but ModelServiceImpl#bringToTop does not check the return value leading to NPE in some rare cases. This now adds an additional check to ensure it simply breaks out in such case.
1 parent 3ae0635 commit 4834d60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,9 @@ public void bringToTop(MUIElement element) {
615615
}
616616

617617
MWindow window = getTopLevelWindowFor(element);
618+
if (window == null) {
619+
return;
620+
}
618621
if (window == element) {
619622
if (!element.isToBeRendered()) {
620623
element.setToBeRendered(true);

0 commit comments

Comments
 (0)