Kaydet (Commit) 39ec34b8 authored tarafından Takeshi Abe's avatar Takeshi Abe

starmath: Avoid creating SmFontNode with a default token

when an unexpected token is found.

Change-Id: I1a11c08ce54c55bb32289498fbb26af019396b83
Reviewed-on: https://gerrit.libreoffice.org/34918Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTakeshi Abe <tabe@fixedpoint.jp>
üst c8267b8b
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment