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

Fixed NPE.

This commit is contained in:
Sergey Prigogin 2009-05-24 04:59:37 +00:00
parent 32f21e3778
commit af90f84dd0

View file

@ -214,7 +214,7 @@ final class ScannerContext {
*/ */
public CodeState setBranchEndState(Conditional cond, boolean withinExpansion, int offset) { public CodeState setBranchEndState(Conditional cond, boolean withinExpansion, int offset) {
// implicit state change // implicit state change
CodeState newState = cond.fInitialState; CodeState newState = cond != null ? cond.fInitialState : CodeState.eActive;
changeState(newState, BranchKind.eEnd, withinExpansion, offset); changeState(newState, BranchKind.eEnd, withinExpansion, offset);
return newState; return newState;
} }