Skip to content

Commit 12efa03

Browse files
committed
fix #3936
1 parent 45f684b commit 12efa03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/latexparser/latexparsing.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ bool latexDetermineContexts2(QDocumentLineHandle *dlh, TokenStack &stack, Comman
695695
//lastComma = -1;
696696
lastEqual = level;
697697
level++;
698-
if(lp->commandDefs.contains(commandStack.top().optionalCommandName + "/" + keyName)){
698+
if(!commandStack.isEmpty() && lp->commandDefs.contains(commandStack.top().optionalCommandName + "/" + keyName)){
699699
// handle keyval values with normal commandStack mechanism (mandatory argument only!!)
700700
// allows argument classification
701701
CommandDescription cd = lp->commandDefs.value(commandStack.top().optionalCommandName + "/" + keyName);

0 commit comments

Comments
 (0)