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

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37108 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2011-01-04 19:43:52 +00:00
parent 06b84910e5
commit bd3d6369c2

View File

@ -67,9 +67,9 @@ static int extractInt(istream & is)
static void resetGrid(InsetMathGrid & grid) static void resetGrid(InsetMathGrid & grid)
{ {
while (grid.ncols() > 1) while (grid.ncols() > 1)
grid.delCol(grid.ncols()); grid.delCol(grid.ncols() - 1);
while (grid.nrows() > 1) while (grid.nrows() > 1)
grid.delRow(grid.nrows()); grid.delRow(grid.nrows() - 1);
grid.cell(0).erase(0, grid.cell(0).size()); grid.cell(0).erase(0, grid.cell(0).size());
grid.setDefaults(); grid.setDefaults();
} }