1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Catch NPE when dealing with fileextensions.

This commit is contained in:
Alain Magloire 2003-09-12 18:51:18 +00:00
parent 3652dfc5fc
commit 7fd434f1b0

View file

@ -520,10 +520,16 @@ public class DeltaProcessor {
private void updateDependencies(ICElement element){
//Update table
String fileExtension = element.getResource().getFileExtension();
if (fileExtension.equals("h") ||
IResource resource = element.getResource();
if (resource == null)
return;
String fileExtension = resource.getFileExtension();
if ((fileExtension != null) &&
(fileExtension.equals("h") ||
fileExtension.equals("hh") ||
fileExtension.equals("hpp")){
fileExtension.equals("hpp"))){
if (sourceDependencyManager.getProjectDependsForFile(element.getResource().getLocation().toOSString()) == null){
//retrigger dep trees