diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog index eb0abd01723..3b5ed26521f 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 fba4041a4b4..973504626d4 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();