Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ui.cheatsheets/src/org')
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetAction.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetAction.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetAction.java
index f790e7972..2a28355df 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetAction.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetAction.java
@@ -116,10 +116,9 @@ public final class OpenCheatSheetAction extends Action {
*/
public void run() {
Shell shell = Display.getDefault().getActiveShell();
- Object data = shell.getData();
// are we in a dialog that can show a cheat sheet?
- if (!shell.isFocusControl() && data instanceof TrayDialog) {
- TrayDialog dialog = (TrayDialog)data;
+ if (shell != null && !shell.isFocusControl() && shell.getData() instanceof TrayDialog) {
+ TrayDialog dialog = (TrayDialog)shell.getData();
HelpTray tray = (HelpTray)dialog.getTray();
if (tray == null) {
tray = new HelpTray();

Back to the top