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:
parent
c67441b4ef
commit
e8e4b344c0
1 changed files with 2 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue