From: Enrico Forestieri Date: Thu, 19 Aug 2010 08:17:36 +0000 (+0000) Subject: Avoid memory leak when the label is on the first row. X-Git-Tag: 2.0.0~2776 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=66808b04824203ce0aa181d6f8d160e28097b09f;p=features.git 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 --- diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index 4fd4afe992..c12abd1c92 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -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; } }