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

Bug 539145 - Avoid NPE in CaseBreakQuickFixFallthroughAttribute.validPositionForFallthrough()

Change-Id: I8a53691f91411bf88f95112d99c1967b1238515a
This commit is contained in:
Nathan Ridge 2018-09-24 21:20:30 -04:00
parent e6730c9ef0
commit cf99170296

View file

@ -61,6 +61,8 @@ public class CaseBreakQuickFixFallthroughAttribute extends AbstractCaseBreakQuic
try {
IASTTranslationUnit ast = CModelUtil.toWorkingCopy(tu).getAST(null, ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
IASTStatement beforeCaseEnd = getStmtBeforeCaseEnd(marker, ast);
if (beforeCaseEnd == null)
return false;
if (getNextStatement(beforeCaseEnd) == null)
return false;
} catch (CoreException | BadLocationException e) {