Author: vfr
Date: Tue Jan  4 20:43:52 2011
New Revision: 37108
URL: http://www.lyx.org/trac/changeset/37108

Log:
Fix bug #7106: iterator out of range while copying multi-row math.

Modified:
   lyx-devel/trunk/src/mathed/InsetMathGrid.cpp

Modified: lyx-devel/trunk/src/mathed/InsetMathGrid.cpp
==============================================================================
--- lyx-devel/trunk/src/mathed/InsetMathGrid.cpp        Tue Jan  4 17:15:28 
2011        (r37107)
+++ lyx-devel/trunk/src/mathed/InsetMathGrid.cpp        Tue Jan  4 20:43:52 
2011        (r37108)
@@ -67,9 +67,9 @@
 static void resetGrid(InsetMathGrid & grid)
 {
        while (grid.ncols() > 1)
-               grid.delCol(grid.ncols());
+               grid.delCol(grid.ncols() - 1);
        while (grid.nrows() > 1)
-               grid.delRow(grid.nrows());
+               grid.delRow(grid.nrows() - 1);
        grid.cell(0).erase(0, grid.cell(0).size());
        grid.setDefaults();
 }

Reply via email to