diff --git a/lib/forwardanalyzer.cpp b/lib/forwardanalyzer.cpp index 083c7b0aeac7..562bb8387b6a 100644 --- a/lib/forwardanalyzer.cpp +++ b/lib/forwardanalyzer.cpp @@ -811,7 +811,7 @@ namespace { } else if (Token::simpleMatch(tok, "switch (")) { if (updateRecursive(tok->next()->astOperand2()) == Progress::Break) return Break(); - return updateScope(tok->linkAt(1)->next()->link()); + return updateScope(tok->linkAt(1)->linkAt(1)); } else if (Token* callTok = callExpr(tok)) { // TODO: Dont traverse tokens a second time if (start != callTok && tok != callTok && updateRecursive(callTok->astOperand1()) == Progress::Break)