aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/coreSQLiteStudio/parser/lempar.c
diff options
context:
space:
mode:
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/parser/lempar.c')
-rw-r--r--SQLiteStudio3/coreSQLiteStudio/parser/lempar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/parser/lempar.c b/SQLiteStudio3/coreSQLiteStudio/parser/lempar.c
index 3b239dc..5bb7412 100644
--- a/SQLiteStudio3/coreSQLiteStudio/parser/lempar.c
+++ b/SQLiteStudio3/coreSQLiteStudio/parser/lempar.c
@@ -782,7 +782,7 @@ static void yy_reduce(
#endif
{
yy_shift(yypParser,yyact,yygoto,&yygotominor);
- if (parserContext->setupTokens)
+ if (parserContext->setupTokens && yypParser->yyidx >= 0)
{
QList<Token*>* tokensPtr = yypParser->yystack[yypParser->yyidx].tokens;
*tokensPtr = allTokensWithAllInherited + *tokensPtr;
@@ -1023,4 +1023,4 @@ void Parse(
}
}while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
return;
-} \ No newline at end of file
+}