1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Bug 519196 - NullPointerException in IndexUI.getCElementForName

Change-Id: Ia6ad8932056c59f7f818833ba8407dee0e2fcdad
This commit is contained in:
Nathan Ridge 2017-07-05 01:32:24 -04:00
parent 679896ec6e
commit feed18180b

View file

@ -326,6 +326,9 @@ public class IndexUI {
IFile file= (IFile) tu.getResource();
long timestamp= file != null ? file.getLocalTimeStamp() : 0;
IASTFileLocation loc= declName.getFileLocation();
if (loc == null) {
return null;
}
IRegion region= new Region(loc.getNodeOffset(), loc.getNodeLength());
IPositionConverter converter= CCorePlugin.getPositionTrackerManager().findPositionConverter(tu, timestamp);
if (converter != null) {