From 59f94b62676cfa7dfa4595c4650e2a9d4059238f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 18 Aug 2024 09:42:49 +0200 Subject: [PATCH] CID 1474935 --- lib/checkunusedvar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkunusedvar.cpp b/lib/checkunusedvar.cpp index f22987b77b1..755b77517c7 100644 --- a/lib/checkunusedvar.cpp +++ b/lib/checkunusedvar.cpp @@ -1595,7 +1595,7 @@ bool CheckUnusedVar::isRecordTypeWithoutSideEffects(const Type* type) continue; // ignore default/deleted constructors const bool emptyBody = (f.functionScope && Token::simpleMatch(f.functionScope->bodyStart, "{ }")); - const Token* nextToken = f.argDef->link(); + const Token* nextToken = f.argDef ? f.argDef->link() : nullptr; if (Token::simpleMatch(nextToken, ") :")) { // validating initialization list nextToken = nextToken->next(); // goto ":"