fix klocwork warning; pointer is checked and then dereferenced. FN ticket: #10570

This commit is contained in:
Daniel Marjamäki 2021-10-29 19:23:01 +02:00
parent 20883a5a3f
commit b872639e31
1 changed files with 2 additions and 1 deletions

View File

@ -1920,7 +1920,8 @@ static ExprEngine::ValuePtr executeAssign(const Token *tok, Data &data)
}
const Token *lhsToken = tok->astOperand1();
assignValue = truncateValue(assignValue, lhsToken->valueType(), data);
if (lhsToken)
assignValue = truncateValue(assignValue, lhsToken->valueType(), data);
call(data.callbacks, tok, assignValue, &data);
assignExprValue(lhsToken, assignValue, data);