From 66808b04824203ce0aa181d6f8d160e28097b09f Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 19 Aug 2010 08:17:36 +0000 Subject: [PATCH] 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 --- src/mathed/InsetMathHull.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } } -- 2.39.2