Skip to content

Commit

Permalink
Fix IllegalArgumentException
Browse files Browse the repository at this point in the history
  • Loading branch information
travkin79 committed Oct 10, 2023
1 parent ea3b06d commit 2c3e202
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ public void handleEvent(Event event) {
if (menu != null) {
menu.dispose();
}
menu = new Menu(control.getDisplay().getFocusControl());

Control focusControl = control.getDisplay().getFocusControl();
if (focusControl == null) {
return;
}

menu = new Menu(focusControl);
for (final Action action : menuActions) {
MenuItem item = new MenuItem(menu, SWT.PUSH);
item.setText(action.getText());
Expand Down

0 comments on commit 2c3e202

Please sign in to comment.