diff options
author | Chris Goldthorpe | 2007-11-21 00:28:26 +0000 |
---|---|---|
committer | Chris Goldthorpe | 2007-11-21 00:28:26 +0000 |
commit | f11b7bd669bbeac8fe1ea87834e8eb6c6a11935f (patch) | |
tree | 489d3c46cdd66699979178550d504d41445af4c3 | |
parent | 85763e7a7b84f1e63a363440b14fca144b03745a (diff) | |
download | eclipse.platform.ua-f11b7bd669bbeac8fe1ea87834e8eb6c6a11935f.tar.gz eclipse.platform.ua-f11b7bd669bbeac8fe1ea87834e8eb6c6a11935f.tar.xz eclipse.platform.ua-f11b7bd669bbeac8fe1ea87834e8eb6c6a11935f.zip |
Avoid null pointer check when using OpenCheatSheetFromHelpAction.
-rw-r--r-- | org.eclipse.ui.cheatsheets/src/org/eclipse/ui/cheatsheets/OpenCheatSheetAction.java | 5 |
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(); |