From 9d4ccb3652378f026b3e1ca55ce493efda9be553 Mon Sep 17 00:00:00 2001 From: chrchr-github Date: Tue, 6 Aug 2024 22:27:51 +0200 Subject: [PATCH] Fix --- lib/programmemory.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/programmemory.cpp b/lib/programmemory.cpp index 2c266c49999..1e7ba3323d6 100644 --- a/lib/programmemory.cpp +++ b/lib/programmemory.cpp @@ -1572,8 +1572,11 @@ namespace { return unknown(); } else if (expr->str() == "(" && expr->isCast()) { - if (expr->astOperand2() && expr->astOperand1()->str() != "dynamic_cast") - return execute(expr->astOperand2()); + if (expr->astOperand2()) { + if (expr->astOperand1()->str() != "dynamic_cast") + return execute(expr->astOperand2()); + return unknown(); + } return execute(expr->astOperand1()); } if (expr->exprId() > 0 && pm->hasValue(expr->exprId())) {