Fixed #7866 (Crash while scanning QML files)
This commit is contained in:
parent
25e50e2a98
commit
956b5812e7
|
@ -95,10 +95,13 @@ void CheckUnusedFunctions::parseTokens(const Tokenizer &tokenizer, const char Fi
|
|||
// parsing of library code to find called functions
|
||||
if (settings->library.isexecutableblock(FileName, tok->str())) {
|
||||
const Token * markupVarToken = tok->tokAt(settings->library.blockstartoffset(FileName));
|
||||
// not found
|
||||
if (!markupVarToken)
|
||||
continue;
|
||||
int scope = 0;
|
||||
bool start = true;
|
||||
// find all function calls in library code (starts with '(', not if or while etc)
|
||||
while (scope || start) {
|
||||
while ((scope || start) && markupVarToken) {
|
||||
if (markupVarToken->str() == settings->library.blockstart(FileName)) {
|
||||
scope++;
|
||||
if (start) {
|
||||
|
|
Loading…
Reference in New Issue