]> git.lyx.org Git - features.git/commitdiff
Fix crash when selecting muticolumn in math
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 22 Feb 2017 15:13:19 +0000 (16:13 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 23 Feb 2017 09:51:12 +0000 (10:51 +0100)
The cells that are part of the multicolumn are not in the cache, and
it is OK.

Fixes bug #10486.

src/mathed/InsetMathNest.cpp
status.22x

index 6f3236496435c330c29c55f9ed555e21ed24e492..52524c70c6a9c5c403c95c5e643dea6f5afcc5df 100644 (file)
@@ -311,6 +311,9 @@ void InsetMathNest::drawSelection(PainterInfo & pi, int x, int y) const
                for (idx_type i = 0; i < nargs(); ++i) {
                        if (idxBetween(i, s1.idx(), s2.idx())) {
                                MathData const & c = cell(i);
+                               // this can happen when cell is part of multicolumn
+                               if (!bv.coordCache().getArrays().has(&c))
+                                       continue;
                                Geometry const & g = bv.coordCache().getArrays().geometry(&c);
                                int x1 = g.pos.x_;
                                int y1 = g.pos.y_ - g.dim.ascent();
index f098e3883d928d3db9bf80519694fb8ef6076292..df669fa107b1570cd4acf1def00fd51327729ba9 100644 (file)
@@ -172,6 +172,8 @@ What's new
 
 - Fix crash when the document contains Unicode line-breaking characters.
 
+- Fix assertion when selecting muticolumn in math (bug 10486).
+
 - Allow using colors supported by xcolor inside mathed (bug 10417).
 
 - Change description of "frame of button" color to "button frame" (bug