don't dereference invalid iterators

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10596 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2005-11-08 15:12:05 +00:00
parent e5cb61130f
commit 5be7e73fde
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2005-11-08 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* math_parser.C (delEmptyLastRow): Don't delete the dummy row, but
the last full row, since the dummy row has only rowinfo
2005-11-02 Angus Leeming <leeming@lyx.org>
* math_nestinset.C: trivial fix to a MSVS warning.

View File

@ -181,9 +181,11 @@ void delEmptyLastRow(MathGridInset & grid)
if (!grid.cell(grid.index(row, col)).empty())
return;
}
// Remove the dummy row, so that the previous last row (that would
// contain the last hline in the example above) becomes the dummy row.
grid.delRow(row + 1);
// Copy the row information of the empty row (which would contain the
// last hline in the example above) to the dummy row and delete the
// empty row.
grid.rowinfo(row + 1) = grid.rowinfo(row);
grid.delRow(row);
}