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(), ";|{|}|:|("))
|
||||
break;
|
||||
}
|
||||
if (tok2->previous()->str()=="(")
|
||||
if (tok2 && tok2->previous() && tok2->previous()->str()=="(")
|
||||
continue;
|
||||
if (Token::simpleMatch(tok2, "std :: cin"))
|
||||
nullPointerError(tok);
|
||||
|
|
Loading…
Reference in New Issue