diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 4e0e15f42..8c9478bff 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -5706,13 +5706,13 @@ void SymbolDatabase::setValueType(Token *tok, const ValueType &valuetype) if (ternary || parent->isArithmeticalOp() || parent->tokType() == Token::eIncDecOp) { // CONTAINER + pointer => CONTAINER - if (parent->str() == "+" && vt1 && vt1->type == ValueType::Type::CONTAINER && vt2 && vt2->pointer != 0) { + if (parent->str() == "+" && vt1->type == ValueType::Type::CONTAINER && vt2 && vt2->pointer != 0) { setValueType(parent, *vt1); return; } // pointer + CONTAINER => CONTAINER - if (parent->str() == "+" && vt1 && vt1->pointer != 0U && vt2 && vt2->type == ValueType::Type::CONTAINER) { + if (parent->str() == "+" && vt1->pointer != 0U && vt2 && vt2->type == ValueType::Type::CONTAINER) { setValueType(parent, *vt2); return; }