Fixed CID 1214638: Dereference before null check (REVERSE_INULL).

This commit is contained in:
orbitcowboy 2014-05-12 17:18:51 +02:00
parent e993e2927c
commit ac8d283afb
1 changed files with 1 additions and 1 deletions

View File

@ -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);