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

Avoid NPE in LocationMap.

This commit is contained in:
John Camelon 2005-07-04 15:55:20 +00:00
parent c67441b4ef
commit e8e4b344c0

View file

@ -1619,6 +1619,8 @@ public class LocationMap implements ILocationResolver, IScannerPreprocessorLog {
if (tu == null)
return EMPTY_LOCATION_ARRAY;
_Context c = findContextForOffset(offset);
if( c == null )
return EMPTY_LOCATION_ARRAY;
int offset1 = offset + length;
if ((offset1 >= c.context_directive_start && offset1 <= c.context_ends)) {
if (c instanceof _CompositeContext) {