Make sure to not dereference a null pointer.

This commit is contained in:
Enrico Forestieri 2020-02-10 21:54:07 +01:00
parent b8546139c8
commit 536d476d38

View File

@ -2083,7 +2083,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
Encodings::MATH_CMD | Encodings::TEXT_CMD,
is_combining, termination);
}
if (c && buf->params().encoding().encodable(c)) {
if (c && buf && buf->params().encoding().encodable(c)) {
if (termination) {
if (nextToken().cat() == catBegin) {
getToken();