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