summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--starmath/source/parse.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index a2ba86971b11..76c4b243332a 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1802,7 +1802,10 @@ void SmParser::DoColor()
NextToken();
}
else
+ {
Error(SmParseError::ColorExpected);
+ return;
+ }
} while (m_aCurToken.eType == TCOLOR);
m_aNodeStack.push_front(o3tl::make_unique<SmFontNode>(aToken));
@@ -1822,7 +1825,10 @@ void SmParser::DoFont()
NextToken();
}
else
+ {
Error(SmParseError::FontExpected);
+ return;
+ }
} while (m_aCurToken.eType == TFONT);
m_aNodeStack.push_front(o3tl::make_unique<SmFontNode>(aToken));