1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-19 23:15:24 +02:00

Fixes a NPE.

This commit is contained in:
Markus Schorn 2009-02-25 14:33:59 +00:00
parent 950242a0f3
commit 588b7c399d

View file

@ -40,12 +40,14 @@ class PDOMCPPTypeList {
db.putShort(p, len); p+=2; db.putShort(p, len); p+=2;
for (int i=0; i<len; i++, p+=NODE_SIZE) { for (int i=0; i<len; i++, p+=NODE_SIZE) {
final IType type = types[i]; final IType type = types[i];
int rec= 0;
if (type != null) { if (type != null) {
final PDOMNode pdomType = linkage.addType(parent, type); final PDOMNode pdomType = linkage.addType(parent, type);
db.putInt(p, pdomType.getRecord()); if (pdomType != null) {
} else { rec= pdomType.getRecord();
db.putInt(p, 0); }
} }
db.putInt(p, rec);
} }
return block; return block;
} }