1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 09:15:38 +02:00

Fix for NPE in DOMSourceIndexerRunner.AddMarkerProblem.run().

Possible fix for PR 98571: Multiple "Starter.exe" and "cygpath.exe" when launch IDE
This commit is contained in:
Vladimir Hirsl 2005-06-06 20:22:51 +00:00
parent 58ed6a6cdd
commit 2290223ab3
2 changed files with 8 additions and 3 deletions

View file

@ -123,6 +123,7 @@ public class CygpathTranslator {
} }
} }
} }
cygpath.cygPath.dispose();
return translatedIncludePaths; return translatedIncludePaths;
} }

View file

@ -351,7 +351,7 @@ public class DOMSourceIndexerRunner extends AbstractIndexer {
if (location != null) { if (location != null) {
try { try {
//we only ever add index markers on the file, so DEPTH_ZERO is far enough //we only ever add index markers on the file, so DEPTH_ZERO is far enough
IMarker[] markers = resource.findMarkers(ICModelMarker.INDEXER_MARKER, true,IResource.DEPTH_ZERO); IMarker[] markers = resource.findMarkers(ICModelMarker.INDEXER_MARKER, true, IResource.DEPTH_ZERO);
boolean newProblem = true; boolean newProblem = true;
@ -363,9 +363,13 @@ public class DOMSourceIndexerRunner extends AbstractIndexer {
for (int i=0; i<markers.length; i++) { for (int i=0; i<markers.length; i++) {
tempMarker = markers[i]; tempMarker = markers[i];
nameStart = ((Integer) tempMarker.getAttribute(IMarker.CHAR_START)).intValue(); tempMsgString = (String) tempMarker.getAttribute(IMarker.MESSAGE);
Integer tempInt = (Integer) tempMarker.getAttribute(IMarker.CHAR_START);
if (tempInt == null) {
continue;
}
nameStart = tempInt.intValue();
nameLen = ((Integer) tempMarker.getAttribute(IMarker.CHAR_END)).intValue() - nameStart; nameLen = ((Integer) tempMarker.getAttribute(IMarker.CHAR_END)).intValue() - nameStart;
tempMsgString = (String) tempMarker.getAttribute(IMarker.MESSAGE);
if (nameStart != -1 && if (nameStart != -1 &&
nameStart == location.getNodeOffset() && nameStart == location.getNodeOffset() &&
nameLen == location.getNodeLength() && nameLen == location.getNodeLength() &&