diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java index 873bec74763..fd365685a43 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java @@ -1240,17 +1240,19 @@ public class CoreModel { if (pe.getEntryKind() == IPathEntry.CDT_CONTAINER) { IPathEntryContainer peContainer = CoreModel.getPathEntryContainer( pe.getPath(), cProject); - if (peContainer instanceof IPathEntryContainerExtension) { - IPathEntryContainerExtension contExt = (IPathEntryContainerExtension) peContainer; - if (!contExt.isEmpty(resPath)) { + if (peContainer != null) { + if (peContainer instanceof IPathEntryContainerExtension) { + IPathEntryContainerExtension contExt = (IPathEntryContainerExtension) peContainer; + if (!contExt.isEmpty(resPath)) { + rc = false; + break; + } + } + else if (peContainer.getPathEntries().length > 0) { rc = false; break; } } - else if (peContainer.getPathEntries().length > 0) { - rc = false; - break; - } } // then the user specified scanner info else if ((pe.getEntryKind() & PATH_ENTRY_MASK) != 0) {