From: Enrico Forestieri Date: Mon, 10 Feb 2020 20:54:07 +0000 (+0100) Subject: Make sure to not dereference a null pointer. X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=64d3452f8804b28aae19b35c4f80f754fd94c033;p=features.git Make sure to not dereference a null pointer. --- diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp index 9c2db23bd9..c38acca7ed 100644 --- a/src/mathed/MathParser.cpp +++ b/src/mathed/MathParser.cpp @@ -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();