]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathParser.cpp
Fix bug #7106: iterator out of range while copying multi-row math.
[lyx.git] / src / mathed / MathParser.cpp
index 4767dc1536cc6ae5bce7de6896307d7e6641902a..ad52e76105c3a0a0f8038672cdaa3230bf53237f 100644 (file)
@@ -1831,12 +1831,15 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
 
                else if (t.cs().size()) {
                        bool const no_mhchem =
-                               (t.cs() == "ce" || t.cs() == "cf") && buf
-                               && buf->params().use_mhchem == BufferParams::package_off;
+                               (t.cs() == "ce" || t.cs() == "cf")
+                               && buf && buf->params().use_mhchem ==
+                                               BufferParams::package_off;
+
                        bool const is_user_macro = no_mhchem ||
                                (buf && (mode_ & Parse::TRACKMACRO
-                                       ? buf->usermacros.count(t.cs()) != 0
-                                       : buf->getMacro(t.cs(), false) != 0));
+                                        ? buf->usermacros.count(t.cs()) != 0
+                                        : buf->getMacro(t.cs(), false) != 0));
+
                        latexkeys const * l = in_word_set(t.cs());
                        if (l && !is_user_macro) {
                                if (l->inset == "big") {