1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-09 19:43:27 +02:00

fixed NPE

This commit is contained in:
David Inglis 2004-04-30 14:20:22 +00:00
parent 4c924a5283
commit 9e3714d448

View file

@ -468,7 +468,7 @@ public class CPElement {
res = root.getFolder(path); res = root.getFolder(path);
} }
} }
if (res.getType() != IResource.PROJECT) { if (res.getType() != IResource.PROJECT && project != null) {
isMissing = !project.isOnSourceRoot(res); isMissing = !project.isOnSourceRoot(res);
} }
exclusion = ((IIncludeEntry) curr).getExclusionPatterns(); exclusion = ((IIncludeEntry) curr).getExclusionPatterns();
@ -485,7 +485,7 @@ public class CPElement {
res = root.getFolder(path); res = root.getFolder(path);
} }
} }
if (res.getType() != IResource.PROJECT) { if (res.getType() != IResource.PROJECT && project != null) {
isMissing = !project.isOnSourceRoot(res); isMissing = !project.isOnSourceRoot(res);
} }
exclusion = ((IMacroEntry) curr).getExclusionPatterns(); exclusion = ((IMacroEntry) curr).getExclusionPatterns();