1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 10:46:02 +02:00

Bug 242335 - Eclipse Ganymede hangs on startup

This commit is contained in:
Anton Leherbauer 2008-08-01 10:57:21 +00:00
parent c4f2d97cf1
commit 1d8d0320a9
2 changed files with 5 additions and 3 deletions

View file

@ -324,9 +324,11 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent
int offset = editorSelection.getOffset();
ICElement editorElement;
ICElement editorElement= null;
try {
editorElement = fInput.getElementAtOffset(offset);
if (fInput.isStructureKnown() && fInput.isConsistent()) {
editorElement = fInput.getElementAtOffset(offset);
}
} catch (CModelException e) {
return;
}

View file

@ -1716,7 +1716,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
((IWorkingCopy) unit).reconcile();
}
return unit.getElementAtOffset(offset);
} else if (unit.isConsistent()) {
} else if (unit.isStructureKnown() && unit.isConsistent()) {
return unit.getElementAtOffset(offset);
}
} catch (CModelException x) {