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:
parent
3652dfc5fc
commit
7fd434f1b0
1 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue