Fixed CID 1214638: Dereference before null check (REVERSE_INULL).
This commit is contained in:
parent
e993e2927c
commit
ac8d283afb
|
@ -886,7 +886,7 @@ void CheckNullPointer::nullConstantDereference()
|
||||||
if (Token::Match(tok2->previous(), ";|{|}|:|("))
|
if (Token::Match(tok2->previous(), ";|{|}|:|("))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (tok2->previous()->str()=="(")
|
if (tok2 && tok2->previous() && tok2->previous()->str()=="(")
|
||||||
continue;
|
continue;
|
||||||
if (Token::simpleMatch(tok2, "std :: cin"))
|
if (Token::simpleMatch(tok2, "std :: cin"))
|
||||||
nullPointerError(tok);
|
nullPointerError(tok);
|
||||||
|
|
Loading…
Reference in New Issue