Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2004-04-06 19:23:46 -0400
committerAlain Magloire2004-04-06 19:23:46 -0400
commit9ac35a9e9763c27d22b9a739212550b84c8d6be8 (patch)
tree7290b26985630e1fae6f6a4e3632357b4be98b70
parent3a4caa0d2010e7e5b1cc76b437b681c2661d769e (diff)
downloadorg.eclipse.cdt-9ac35a9e9763c27d22b9a739212550b84c8d6be8.tar.gz
org.eclipse.cdt-9ac35a9e9763c27d22b9a739212550b84c8d6be8.tar.xz
org.eclipse.cdt-9ac35a9e9763c27d22b9a739212550b84c8d6be8.zip
Possible NPE
-rw-r--r--core/org.eclipse.cdt.core/ChangeLog6
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeReference.java7
2 files changed, 12 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog
index eb0abd0172..3b5ed26521 100644
--- a/core/org.eclipse.cdt.core/ChangeLog
+++ b/core/org.eclipse.cdt.core/ChangeLog
@@ -1,3 +1,9 @@
+2004-04-06 Alain Magloire
+
+ Fix possible NPE.
+
+ * model/org/eclipse/cdt/internal/core/model/IncludeRefence.java
+
2004-04-06 David Inglis
Fixed up syncing of binary runner and ::getBinaries()
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeReference.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeReference.java
index fba4041a4b..973504626d 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeReference.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/IncludeReference.java
@@ -89,7 +89,12 @@ public class IncludeReference extends Openable implements IIncludeReference {
protected boolean computeChildren(OpenableInfo info, IResource res) throws CModelException {
ArrayList vChildren = new ArrayList();
final CModelManager factory = CModelManager.getDefault();
- File file = fIncludeEntry.getIncludePath().toFile();
+ File file = null;
+ if (fPath != null) {
+ file = fPath.toFile();
+ } else if (fIncludeEntry != null) {
+ file = fIncludeEntry.getIncludePath().toFile();
+ }
String[] names = null;
if (file != null && file.isDirectory()) {
names = file.list();

Back to the top