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

Bug 524258 - NPE in QuickAssistProcessor.runOnAST()

Change-Id: I65653080a5a8f20567809d0d43126aff5a974a46
This commit is contained in:
Nathan Ridge 2017-09-26 00:09:54 -04:00
parent 20a88df65c
commit e1b68206ae

View file

@ -83,6 +83,10 @@ public class QuickAssistProcessor implements IQuickAssistProcessor {
@Override
public IStatus runOnAST(ILanguage lang, IASTTranslationUnit astRoot) throws CoreException {
if (astRoot == null) {
return Status.CANCEL_STATUS;
}
IASTNodeSelector selector= astRoot.getNodeSelector(null);
IASTName name= selector.findEnclosingName(context.getSelectionOffset(), context.getSelectionLength());