From 64d3452f8804b28aae19b35c4f80f754fd94c033 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Mon, 10 Feb 2020 21:54:07 +0100 Subject: [PATCH] Make sure to not dereference a null pointer. --- src/mathed/MathParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.39.5