diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java index bebbc0a4d8b..6555cb3b6e4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ScannerContext.java @@ -214,7 +214,7 @@ final class ScannerContext { */ public CodeState setBranchEndState(Conditional cond, boolean withinExpansion, int offset) { // implicit state change - CodeState newState = cond.fInitialState; + CodeState newState = cond != null ? cond.fInitialState : CodeState.eActive; changeState(newState, BranchKind.eEnd, withinExpansion, offset); return newState; }