From 42a95c92021232bc3194355178cf0a843c079655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 21 Apr 2012 18:02:26 +0200 Subject: [PATCH] Tokenizer::setVarIdNew: Fixed segfault when using new setVarId on invalid code --- lib/tokenize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 261f13fb1..d687f9939 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -2931,7 +2931,7 @@ void Tokenizer::setVarIdNew() } } else if (tok->str() == "}") { // Set variable ids in class declaration.. - if (!isC() && !executableScope.top()) { + if (!isC() && !executableScope.top() && tok->link()) { setVarIdClassDeclaration(tok->link(), variableId, scopestartvarid.top()); }