mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +02:00
Bug fix NPE.
This commit is contained in:
parent
3c432412f0
commit
751106a094
1 changed files with 4 additions and 1 deletions
|
@ -152,7 +152,10 @@ public class EditorUtility {
|
|||
element= ((IWorkingCopy) element).getOriginalElement();
|
||||
|
||||
if (element instanceof ISourceReference) {
|
||||
element = ((ISourceReference)element).getTranslationUnit();
|
||||
ITranslationUnit tu = ((ISourceReference)element).getTranslationUnit();
|
||||
if (tu != null) {
|
||||
element = tu;
|
||||
}
|
||||
}
|
||||
|
||||
if (element instanceof ITranslationUnit) {
|
||||
|
|
Loading…
Add table
Reference in a new issue