]> git.lyx.org Git - features.git/commitdiff
Amend 44816adce63: Be careful before using buffer parameters in colAlign
authorKornel Benko <kornel@lyx.org>
Mon, 1 Jun 2020 08:20:38 +0000 (10:20 +0200)
committerKornel Benko <kornel@lyx.org>
Mon, 1 Jun 2020 08:20:38 +0000 (10:20 +0200)
The LASSERT(isBufferValid()..) leads to crash in find-adv dialog

src/mathed/InsetMathGrid.cpp

index b6d90eed16b9a2081fe5d60cbc686478fb0ffe13..5a5d45403fbe28b36117086db31f9f011b45b5ce 100644 (file)
@@ -1821,9 +1821,17 @@ char InsetMathGrid::colAlign(HullType type, col_type col) const
        case hullMultline:
                return 'c';
        case hullGather:
+               #if 0
+               // Partly revert 44816adce63
+               // because the following test leads to crash
+               // Open a new lyx-file
+               // select findadv dialog
+               // in the search-field enter math
+               // use math-mutate gather ===> crash (because isValidBuffer() == false)
                LASSERT(isBufferValid(),
                                LYXERR0("Buffer not set correctly. Please report!");
                                return 'c';);
+               #endif
                if (buffer().params().is_math_indent)
                        return 'l';
                else