mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Fix for 192406 by Gerhard Schaber, NPE in PerFileSICollector.
This commit is contained in:
parent
bd9d9d2a75
commit
1e695dec9b
1 changed files with 4 additions and 2 deletions
|
@ -360,9 +360,11 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Set oldFileSet = (Set) sid.commandIdToFilesMap.get(oldCommandId);
|
Set oldFileSet = (Set) sid.commandIdToFilesMap.get(oldCommandId);
|
||||||
|
if (oldFileSet != null) {
|
||||||
oldFileSet.remove(file);
|
oldFileSet.remove(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (change) {
|
if (change) {
|
||||||
sid.fileToCommandIdMap.put(file, commandId);
|
sid.fileToCommandIdMap.put(file, commandId);
|
||||||
// TODO generate change event for this resource
|
// TODO generate change event for this resource
|
||||||
|
@ -498,7 +500,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
|
||||||
for (Iterator i = sid.commandIdCommandMap.keySet().iterator(); i.hasNext(); ) {
|
for (Iterator i = sid.commandIdCommandMap.keySet().iterator(); i.hasNext(); ) {
|
||||||
Integer cmdId = (Integer) i.next();
|
Integer cmdId = (Integer) i.next();
|
||||||
Set fileSet = (Set) sid.commandIdToFilesMap.get(cmdId);
|
Set fileSet = (Set) sid.commandIdToFilesMap.get(cmdId);
|
||||||
if (!fileSet.isEmpty()) {
|
if (fileSet != null && !fileSet.isEmpty()) {
|
||||||
rv.add(sid.commandIdCommandMap.get(cmdId));
|
rv.add(sid.commandIdCommandMap.get(cmdId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue