From 96ea5a432f8ca089fdbf0d0114849dbb734f86e0 Mon Sep 17 00:00:00 2001 From: Ken-Patrick Lehrmann Date: Sun, 31 Jan 2021 12:14:10 +0100 Subject: [PATCH] Fix crash in checkclass.cpp (#3104) --- lib/checkclass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkclass.cpp b/lib/checkclass.cpp index 3cf986c69..55effa06b 100644 --- a/lib/checkclass.cpp +++ b/lib/checkclass.cpp @@ -170,7 +170,7 @@ void CheckClass::constructors() if (usage[count].assign || usage[count].init || var.isStatic()) continue; - if (var.valueType()->pointer == 0 && var.type() && var.type()->needInitialization == Type::NeedInitialization::False && var.type()->derivedFrom.empty()) + if (var.valueType() && var.valueType()->pointer == 0 && var.type() && var.type()->needInitialization == Type::NeedInitialization::False && var.type()->derivedFrom.empty()) continue; if (var.isConst() && func.isOperator()) // We can't set const members in assignment operator