Fixed #4300 (segmentation fault of cppcheck (invalid code))
This commit is contained in:
parent
2a660fa3b4
commit
b892d2e14c
|
@ -8471,7 +8471,7 @@ void Tokenizer::simplifyStructDecl()
|
||||||
tok = tok->next()->link();
|
tok = tok->next()->link();
|
||||||
|
|
||||||
// unnamed anonymous struct/union so possibly remove it
|
// unnamed anonymous struct/union so possibly remove it
|
||||||
if (tok->next() && tok->next()->str() == ";") {
|
if (tok && tok->next() && tok->next()->str() == ";") {
|
||||||
if (tok1->str() == "union" && inFunction) {
|
if (tok1->str() == "union" && inFunction) {
|
||||||
// Try to create references in the union..
|
// Try to create references in the union..
|
||||||
Token *tok2 = tok1->tokAt(2);
|
Token *tok2 = tok1->tokAt(2);
|
||||||
|
|
Loading…
Reference in New Issue