Fix segfault when there is no ast generated in lambda function

This commit is contained in:
Daniel Marjamäki 2016-07-18 14:08:44 +02:00
parent 0ddeac0429
commit f55040a987
1 changed files with 1 additions and 1 deletions

View File

@ -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<const Token *> tokens;