Fixed crash #4135 when using Q_DECLARE_METATYPE
This commit is contained in:
parent
2be2738c6e
commit
d98ee357d4
|
@ -394,7 +394,7 @@ void CheckOther::invalidPointerCast()
|
||||||
if (Token::Match(tok, "( const| %type% const| * )") || Token::Match(tok, "( const| %type% %type% const| * )")) {
|
if (Token::Match(tok, "( const| %type% const| * )") || Token::Match(tok, "( const| %type% %type% const| * )")) {
|
||||||
toTok = tok->next();
|
toTok = tok->next();
|
||||||
nextTok = tok->link()->next();
|
nextTok = tok->link()->next();
|
||||||
if (nextTok->str() == "(")
|
if (nextTok && nextTok->str() == "(")
|
||||||
nextTok = nextTok->next();
|
nextTok = nextTok->next();
|
||||||
} else if (Token::Match(tok, "reinterpret_cast < const| %type% const| * > (") || Token::Match(tok, "reinterpret_cast < const| %type% %type% const| * > (")) {
|
} else if (Token::Match(tok, "reinterpret_cast < const| %type% const| * > (") || Token::Match(tok, "reinterpret_cast < const| %type% %type% const| * > (")) {
|
||||||
nextTok = tok->tokAt(5);
|
nextTok = tok->tokAt(5);
|
||||||
|
|
Loading…
Reference in New Issue