Fix crashes when Variable::valueType is nullptr, this can happen when decltype(unknown type) is used.
This commit is contained in:
parent
0bbd18f364
commit
809cec2b58
|
@ -1265,7 +1265,7 @@ void CheckOther::checkPassByReference()
|
|||
|
||||
bool inconclusive = false;
|
||||
|
||||
if (var->valueType()->type == ValueType::Type::CONTAINER) {
|
||||
if (var->valueType() && var->valueType()->type == ValueType::Type::CONTAINER) {
|
||||
} else if (var->type() && !var->type()->isEnumType()) { // Check if type is a struct or class.
|
||||
// Ensure that it is a large object.
|
||||
if (!var->type()->classScope)
|
||||
|
|
Loading…
Reference in New Issue