commit 6eb94528364c99be632a4631c25d47b9c0788644
Author: Kornel Benko <[email protected]>
Date:   Thu Apr 18 15:07:30 2019 +0200

    Amend [f2029fb3/lyxgit]
    
    Omitting acces to invalid index
---
 src/mathed/MathParser.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp
index 65ef723..0286ba1 100644
--- a/src/mathed/MathParser.cpp
+++ b/src/mathed/MathParser.cpp
@@ -947,7 +947,9 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                        // do not create a BraceInset if they were written by 
LyX
                        // this helps to keep the annoyance of  "a choose b"  
to a minimum
                        // But create a BraceInset if a script follows (#9348)
-                       InsetMathBrace const * mb = ar[0]->asBraceInset();
+                       InsetMathBrace const * mb;
+                       if (ar.size() > 0)
+                               mb = ar[0]->asBraceInset();
                        if (ar.size() == 1 && (ar[0]->extraBraces()
                                               || (mb && mb->cell(0).size()
                                                   && 
!mb->cell(0)[0].nucleus()->asScriptInset())))

Reply via email to