value flow: fix segfault if var is null
This commit is contained in:
parent
c687933e9f
commit
57d241793f
|
@ -137,7 +137,7 @@ static void valueFlowBeforeCondition(TokenList *tokenlist, ErrorLogger *errorLog
|
||||||
} else {
|
} else {
|
||||||
tok2 = tok2->link();
|
tok2 = tok2->link();
|
||||||
}
|
}
|
||||||
} else if (var->isGlobal() && tok2->str() == "{") {
|
} else if (var && var->isGlobal() && tok2->str() == "{") {
|
||||||
if (!Token::Match(tok2->previous(), ")|else {"))
|
if (!Token::Match(tok2->previous(), ")|else {"))
|
||||||
break;
|
break;
|
||||||
if (Token::Match(tok2->previous(), ") {") &&
|
if (Token::Match(tok2->previous(), ") {") &&
|
||||||
|
|
Loading…
Reference in New Issue