Skip to content

Commit

Permalink
ContributedPartRenderer$1.setFocus: prevent NPE eclipse-platform#2367
Browse files Browse the repository at this point in the history
during PartRenderingEngineTests

eclipse-platform#2367
  • Loading branch information
EcljpseB0T authored and lathapatil committed Oct 21, 2024
1 parent 360272d commit a2976d8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ public boolean setFocus() {
Object object = part.getObject();
if (object != null && isEnabled()) {
IPresentationEngine pe = part.getContext().get(IPresentationEngine.class);
pe.focusGui(part);
return true;
if (pe != null) {
pe.focusGui(part);
return true;
}
}
return super.setFocus();
} finally {
Expand Down

0 comments on commit a2976d8

Please sign in to comment.