mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-12 18:55:38 +02:00
Fixed an NPE.
Change-Id: If2455671e50e99a662d469febc8e5babf7fc24e3
This commit is contained in:
parent
cfd51db02b
commit
ef33d0d299
1 changed files with 24 additions and 20 deletions
|
@ -29,6 +29,7 @@ import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
|
import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
|
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||||
|
@ -125,7 +126,9 @@ public class OverrideIndicatorManager implements ICReconcilingListener {
|
||||||
return PROCESS_CONTINUE;
|
return PROCESS_CONTINUE;
|
||||||
}
|
}
|
||||||
IASTDeclarator decl = ASTQueries.findInnermostDeclarator(declarator);
|
IASTDeclarator decl = ASTQueries.findInnermostDeclarator(declarator);
|
||||||
IBinding binding = decl.getName().resolveBinding();
|
IASTName name = decl.getName();
|
||||||
|
if (name != null) {
|
||||||
|
IBinding binding = name.resolveBinding();
|
||||||
if (binding instanceof ICPPMethod) {
|
if (binding instanceof ICPPMethod) {
|
||||||
ICPPMethod method = (ICPPMethod) binding;
|
ICPPMethod method = (ICPPMethod) binding;
|
||||||
try {
|
try {
|
||||||
|
@ -151,6 +154,7 @@ public class OverrideIndicatorManager implements ICReconcilingListener {
|
||||||
} catch (DOMException e) {
|
} catch (DOMException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return PROCESS_CONTINUE;
|
return PROCESS_CONTINUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue