mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-21 17:29:55 +00:00
Handling null pointer on non-Mac systems. #118
This commit is contained in:
parent
7819a0cfa8
commit
6deb104ff7
@ -130,11 +130,13 @@ public class SwtAppleCommander implements Listener {
|
||||
Display.setAppName(textBundle.get("SwtAppleCommander.AppleCommander")); //$NON-NLS-1$
|
||||
// Find the system About menu on Mac OS X.
|
||||
// See https://www.eclipse.org/swt/R3_7/new_and_noteworthy.html#m6
|
||||
if (display.getSystemMenu() != null) {
|
||||
for (MenuItem item : display.getSystemMenu().getItems()) {
|
||||
if (item.getID() == SWT.ID_ABOUT) {
|
||||
item.addSelectionListener(widgetSelectedAdapter(e -> showAboutAppleCommander()));
|
||||
}
|
||||
}
|
||||
}
|
||||
shell = new Shell(display, SWT.BORDER | SWT.CLOSE | SWT.MIN | SWT.TITLE);
|
||||
shell.setText(textBundle.get("SwtAppleCommander.AppleCommander")); //$NON-NLS-1$
|
||||
shell.setImage(imageManager.get(ImageManager.ICON_DISK));
|
||||
|
Loading…
Reference in New Issue
Block a user