Skip to content

Commit

Permalink
Add null check guard
Browse files Browse the repository at this point in the history
- A case reported on the forum of getGraphicalViewer() returning null
  • Loading branch information
Phillipus committed Nov 6, 2024
1 parent a273eed commit cca4be1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ public void deactivateContext() {
@Override
public void selectObjects(Object[] objects) {
// Safety check in case this is called via Display#asyncExec()
if(getGraphicalViewer().getControl() == null) {
if(getGraphicalViewer() == null || getGraphicalViewer().getControl() == null) {
return;
}

Expand Down

0 comments on commit cca4be1

Please sign in to comment.