diff options
author | Darin Wright | 2010-03-25 18:13:34 +0000 |
---|---|---|
committer | Darin Wright | 2010-03-25 18:13:34 +0000 |
commit | 66eda8d717b962c536894ded3bdb8d1ce40350c5 (patch) | |
tree | 5f4934f2fa06d793524478152688237a3c15e012 /org.eclipse.ui.console | |
parent | abe8e66392f27cebe39c753c231523167c1a6724 (diff) | |
download | eclipse.platform.debug-66eda8d717b962c536894ded3bdb8d1ce40350c5.tar.gz eclipse.platform.debug-66eda8d717b962c536894ded3bdb8d1ce40350c5.tar.xz eclipse.platform.debug-66eda8d717b962c536894ded3bdb8d1ce40350c5.zip |
Bug 287829 - NPE in ConsoleView
Diffstat (limited to 'org.eclipse.ui.console')
-rw-r--r-- | org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java index 3289a1b61..31c867809 100644 --- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java +++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -479,15 +479,17 @@ public class ConsoleView extends PageBookView implements IConsoleView, IConsoleL tb.addMouseListener(new MouseAdapter() { public void mouseDown(MouseEvent e) { ToolItem ti= tb.getItem(new Point(e.x, e.y)); - if (ti.getData() instanceof ActionContributionItem) { - ActionContributionItem actionContributionItem= (ActionContributionItem) ti.getData(); - IAction action= actionContributionItem.getAction(); - if (action == fOpenConsoleAction) { - Event event= new Event(); - event.widget= ti; - event.x= e.x; - event.y= e.y; - action.runWithEvent(event); + if (ti != null) { + if (ti.getData() instanceof ActionContributionItem) { + ActionContributionItem actionContributionItem= (ActionContributionItem) ti.getData(); + IAction action= actionContributionItem.getAction(); + if (action == fOpenConsoleAction) { + Event event= new Event(); + event.widget= ti; + event.x= e.x; + event.y= e.y; + action.runWithEvent(event); + } } } } |