Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed cppcheck inconclusive warning, possible null pointer dereferenc…

…e otherwise condition is redundant
  • Loading branch information...
commit 4511d0fe5f583342bf04498d9b2d49a9ed934b29 1 parent ca5e974
@danmar authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/executionpath.cpp
View
5 lib/executionpath.cpp
@@ -402,6 +402,11 @@ void ExecutionPath::checkScope(const Token *tok, std::list<ExecutionPath *> &che
if (tok && tok->str() == "if")
continue;
+ if (!tok) {
+ ExecutionPath::bailOut(newchecks);
+ return;
+ }
+
// there is no "if"..
ExecutionPath::checkScope(tok->next(), checks);
tok = tok->link();
Please sign in to comment.
Something went wrong with that request. Please try again.