From f55040a9876c06d07008db079693e5c270a455e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Mon, 18 Jul 2016 14:08:44 +0200 Subject: [PATCH] Fix segfault when there is no ast generated in lambda function --- lib/checkother.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkother.cpp b/lib/checkother.cpp index c56b6ae96..eaa41d321 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -553,7 +553,7 @@ void CheckOther::checkRedundantAssignment() } // Ensure that LHS in assignments are the same - bool error = oldeq && isSameExpression(_tokenizer->isCPP(), true, eq->astOperand1(), oldeq->astOperand1(), _settings->library.functionpure); + bool error = oldeq && eq->astOperand1() && isSameExpression(_tokenizer->isCPP(), true, eq->astOperand1(), oldeq->astOperand1(), _settings->library.functionpure); // Ensure that variable is not used on right side std::stack tokens;