Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAndrew Gvozdev2016-09-19 20:31:35 +0000
committerAndrew Gvozdev2016-09-26 01:56:41 +0000
commit91e227142bd8a9f8372854e955dcb7c96658912b (patch)
tree6921fede799c781ff176b740e04787e00571c640 /build
parentd652858b3a3bf0b60477b02050c5703e0e1c7439 (diff)
downloadorg.eclipse.cdt-91e227142bd8a9f8372854e955dcb7c96658912b.tar.gz
org.eclipse.cdt-91e227142bd8a9f8372854e955dcb7c96658912b.tar.xz
org.eclipse.cdt-91e227142bd8a9f8372854e955dcb7c96658912b.zip
Bug 501763: NPE in MakeTargetActionProvider
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeTargetActionProvider.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeTargetActionProvider.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeTargetActionProvider.java
index a7eb22687da..444626cfa98 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeTargetActionProvider.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeTargetActionProvider.java
@@ -97,13 +97,15 @@ public class MakeTargetActionProvider extends CommonActionProvider {
public void setContext(ActionContext context) {
super.setContext(context);
- IStructuredSelection selection = (IStructuredSelection) context.getSelection();
- editTargetAction.selectionChanged(selection);
- copyTargetAction.selectionChanged(selection);
- pasteTargetAction.selectionChanged(selection);
- deleteTargetAction.selectionChanged(selection);
- buildTargetAction.selectionChanged(selection);
- buildLastTargetAction.selectionChanged(selection);
+ if (context != null) {
+ IStructuredSelection selection = (IStructuredSelection) context.getSelection();
+ editTargetAction.selectionChanged(selection);
+ copyTargetAction.selectionChanged(selection);
+ pasteTargetAction.selectionChanged(selection);
+ deleteTargetAction.selectionChanged(selection);
+ buildTargetAction.selectionChanged(selection);
+ buildLastTargetAction.selectionChanged(selection);
+ }
}
}

Back to the top