From 9ae4a758b8fb23557d9ee4135e6bec08b429a68b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Thu, 21 Oct 2010 21:28:32 +0200 Subject: [PATCH] Fixed #2116 (Internal error. Token::Match called with varid 0) --- lib/checkpostfixoperator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkpostfixoperator.cpp b/lib/checkpostfixoperator.cpp index 992962fa9..a835d7f99 100644 --- a/lib/checkpostfixoperator.cpp +++ b/lib/checkpostfixoperator.cpp @@ -65,7 +65,7 @@ void CheckPostfixOperator::postfixOperator() } } - if (result) + if (result && tok->previous()->varId()) { const Token *decltok = Token::findmatch(_tokenizer->tokens(), "%varid%", tok->previous()->varId()); if (decltok && Token::Match(decltok->previous(), "iterator|const_iterator|reverse_iterator|const_reverse_iterator"))