Skip to main content
summaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorAlain Magloire2003-12-18 16:37:04 -0500
committerAlain Magloire2003-12-18 16:37:04 -0500
commit654462825d277bf04b65bb90c8722d7329a40b3b (patch)
tree0c32dbf31f1d2a8a3cd516bda2c3d6ddd997dff3 /launch
parentd11053223e15b1439b23a208b65b953280802989 (diff)
downloadorg.eclipse.cdt-654462825d277bf04b65bb90c8722d7329a40b3b.tar.gz
org.eclipse.cdt-654462825d277bf04b65bb90c8722d7329a40b3b.tar.xz
org.eclipse.cdt-654462825d277bf04b65bb90c8722d7329a40b3b.zip
Possible NPE, PR 49146
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
index 07e7926fa3..d8566c627f 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
@@ -290,13 +290,15 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
for (int i = 0; i < nElements; i++) {
if (elements[i] instanceof IAdaptable) {
IResource r = (IResource) ((IAdaptable) elements[i]).getAdapter(IResource.class);
- ICProject cproject = CoreModel.getDefault().create(r.getProject());
- if (cproject != null) {
- IBinary[] bins = cproject.getBinaryContainer().getBinaries();
+ if (r != null) {
+ ICProject cproject = CoreModel.getDefault().create(r.getProject());
+ if (cproject != null) {
+ IBinary[] bins = cproject.getBinaryContainer().getBinaries();
- for (int j = 0; j < bins.length; j++) {
- if (bins[j].isExecutable()) {
- results.add(bins[j]);
+ for (int j = 0; j < bins.length; j++) {
+ if (bins[j].isExecutable()) {
+ results.add(bins[j]);
+ }
}
}
}

Back to the top