diff --git a/lib/checkother.cpp b/lib/checkother.cpp index e264cbf82..7ae70da23 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -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)