Skip to content

Commit

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

#2367
  • Loading branch information
EcljpseB0T authored and jukzi committed Oct 8, 2024
1 parent cc770ec commit c3eba42
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 c3eba42

Please sign in to comment.