AST: create possible NULL pointer dereference if tokenlist is empty. Ticket: #4630
This commit is contained in:
parent
b9aba17b23
commit
c4419ea920
|
@ -376,6 +376,10 @@ void TokenList::createAst()
|
|||
" [ "
|
||||
};
|
||||
|
||||
// No tokens => bail out
|
||||
if (!_front)
|
||||
return;
|
||||
|
||||
for (unsigned int i = 0; i < sizeof(operators) / sizeof(*operators); ++i) {
|
||||
// TODO: extract operators to std::set - that should be faster
|
||||
if (*operators[i] == '>') { // Unary operators, parse from right to left
|
||||
|
|
Loading…
Reference in New Issue