mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Bug 532684 - NPE in PDOMMacroReferenceName constructor
Change-Id: Iea6200203350591927f505213facc9224243cc65
This commit is contained in:
parent
0f9d2cdbba
commit
d598331c81
1 changed files with 2 additions and 2 deletions
|
@ -56,8 +56,8 @@ public final class PDOMMacroReferenceName implements IIndexFragmentName {
|
||||||
|
|
||||||
// Record our location in the file
|
// Record our location in the file
|
||||||
IASTFileLocation fileloc = name.getFileLocation();
|
IASTFileLocation fileloc = name.getFileLocation();
|
||||||
db.putInt(record + NODE_OFFSET_OFFSET, fileloc.getNodeOffset());
|
db.putInt(record + NODE_OFFSET_OFFSET, fileloc != null ? fileloc.getNodeOffset() : 0);
|
||||||
db.putShort(record + NODE_LENGTH_OFFSET, (short) fileloc.getNodeLength());
|
db.putShort(record + NODE_LENGTH_OFFSET, fileloc != null ? (short) fileloc.getNodeLength() : 0);
|
||||||
container.addReference(this);
|
container.addReference(this);
|
||||||
|
|
||||||
if (caller != null) {
|
if (caller != null) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue