mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 17:55:39 +02:00
Bug 524258 - NPE in QuickAssistProcessor.runOnAST()
Change-Id: I65653080a5a8f20567809d0d43126aff5a974a46
This commit is contained in:
parent
20a88df65c
commit
e1b68206ae
1 changed files with 4 additions and 0 deletions
|
@ -83,6 +83,10 @@ public class QuickAssistProcessor implements IQuickAssistProcessor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IStatus runOnAST(ILanguage lang, IASTTranslationUnit astRoot) throws CoreException {
|
public IStatus runOnAST(ILanguage lang, IASTTranslationUnit astRoot) throws CoreException {
|
||||||
|
if (astRoot == null) {
|
||||||
|
return Status.CANCEL_STATUS;
|
||||||
|
}
|
||||||
|
|
||||||
IASTNodeSelector selector= astRoot.getNodeSelector(null);
|
IASTNodeSelector selector= astRoot.getNodeSelector(null);
|
||||||
IASTName name= selector.findEnclosingName(context.getSelectionOffset(), context.getSelectionLength());
|
IASTName name= selector.findEnclosingName(context.getSelectionOffset(), context.getSelectionLength());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue