1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 492489 - Protect against NPE

Change-Id: I5eb6590b94a6267cff0b3da14513f1b00d1170d4
This commit is contained in:
Sergey Prigogin 2016-04-26 14:09:35 -07:00
parent 590d832822
commit d36b9dcdd1

View file

@ -322,7 +322,7 @@ public class IncludeCreator {
// Put the new includes into styledIncludes.
for (IncludeInfo includeInfo : includes) {
IPath header = fContext.resolveInclude(includeInfo);
if (!fContext.wasIncludedPreviously(header)) {
if (header != null && !fContext.wasIncludedPreviously(header)) {
IncludeGroupStyle style = fContext.getIncludeStyle(includeInfo);
StyledInclude prototype = new StyledInclude(header, includeInfo, style);
styledIncludes.add(prototype);