diff --git a/addons/test/util.py b/addons/test/util.py index fc4c528f9..1eb1dfe98 100644 --- a/addons/test/util.py +++ b/addons/test/util.py @@ -13,7 +13,7 @@ def find_cppcheck_binary(): if os.path.exists(location): break else: - raise RuntimeError("Could not fine cppcheck binary") + raise RuntimeError("Could not find cppcheck binary") return location diff --git a/lib/valueflow.cpp b/lib/valueflow.cpp index da538408b..10261f3c6 100644 --- a/lib/valueflow.cpp +++ b/lib/valueflow.cpp @@ -3457,6 +3457,8 @@ static bool isDecayedPointer(const Token *tok) { if (!tok) return false; + if (!tok->astParent()) + return false; if (astIsPointer(tok->astParent()) && !Token::simpleMatch(tok->astParent(), "return")) return true; if (tok->astParent()->isConstOp())