Avoid memory leak when the label is on the first row.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35168 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-08-19 08:17:36 +00:00
parent 80a881b644
commit 66808b0482

View File

@ -1051,8 +1051,10 @@ void InsetMathHull::mutate(HullType newtype)
// set first non-empty label
for (row_type row = 0; row < nrows(); ++row) {
if (label_[row]) {
label_[0] = label_[row];
label_[row] = 0;
if (row > 0) {
label_[0] = label_[row];
label_[row] = 0;
}
break;
}
}