mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Possible NPE, PR 49146
This commit is contained in:
parent
d11053223e
commit
654462825d
1 changed files with 8 additions and 6 deletions
|
@ -290,13 +290,15 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
|
||||||
for (int i = 0; i < nElements; i++) {
|
for (int i = 0; i < nElements; i++) {
|
||||||
if (elements[i] instanceof IAdaptable) {
|
if (elements[i] instanceof IAdaptable) {
|
||||||
IResource r = (IResource) ((IAdaptable) elements[i]).getAdapter(IResource.class);
|
IResource r = (IResource) ((IAdaptable) elements[i]).getAdapter(IResource.class);
|
||||||
ICProject cproject = CoreModel.getDefault().create(r.getProject());
|
if (r != null) {
|
||||||
if (cproject != null) {
|
ICProject cproject = CoreModel.getDefault().create(r.getProject());
|
||||||
IBinary[] bins = cproject.getBinaryContainer().getBinaries();
|
if (cproject != null) {
|
||||||
|
IBinary[] bins = cproject.getBinaryContainer().getBinaries();
|
||||||
|
|
||||||
for (int j = 0; j < bins.length; j++) {
|
for (int j = 0; j < bins.length; j++) {
|
||||||
if (bins[j].isExecutable()) {
|
if (bins[j].isExecutable()) {
|
||||||
results.add(bins[j]);
|
results.add(bins[j]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue