]> git.lyx.org Git - features.git/commitdiff
Make sure to not dereference a null pointer.
authorEnrico Forestieri <forenr@lyx.org>
Mon, 10 Feb 2020 20:54:07 +0000 (21:54 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:51 +0000 (15:48 +0200)
src/mathed/MathParser.cpp

index 9c2db23bd9d507c1ea252aa3f8e21d905232d72f..c38acca7ed0d7b3ab4b90b190cf103b5cf27c4c8 100644 (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();