mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 536470: Fix NPE for includes outside workspace
Change-Id: I487823cf627680f61cf19d1228a84a3da68ce420 Signed-off-by: Jiří Engelthaler <engycz@gmail.com>
This commit is contained in:
parent
9eb262a192
commit
af4a9223c3
1 changed files with 3 additions and 0 deletions
|
@ -1034,6 +1034,9 @@ public class ASTTypeUtil {
|
||||||
}
|
}
|
||||||
IPath path = new Path(filename);
|
IPath path = new Path(filename);
|
||||||
IFile file = ResourceLookup.selectFileForLocation(path, cproject.getProject());
|
IFile file = ResourceLookup.selectFileForLocation(path, cproject.getProject());
|
||||||
|
if (file == null) {
|
||||||
|
return filename;
|
||||||
|
}
|
||||||
IPath workspaceRelative = file.getFullPath();
|
IPath workspaceRelative = file.getFullPath();
|
||||||
return workspaceRelative.toString();
|
return workspaceRelative.toString();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue