From 2e21676cb2c31d72d393a2717bacd0267656956a Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 18 Nov 2011 21:37:03 +0000 Subject: [PATCH] Backport fix for bug #7873. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40213 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text2.cpp | 5 ++++- status.20x | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Text2.cpp b/src/Text2.cpp index ae82050fce..e26d448a70 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -446,8 +446,11 @@ void Text::setLabelWidthStringToSequence(pit_type const par_offset, depth_type const depth = pars_[offset].getDepth(); Layout const & layout = pars_[offset].layout(); for (pit_type pit = offset; pit != end; ++pit) { - while (pars_[pit].getDepth() > depth) + while (pars_[pit].getDepth() > depth) { ++pit; + if (pit == end) + return; + } if (pars_[pit].getDepth() < depth) return; if (pars_[pit].layout() != layout) diff --git a/status.20x b/status.20x index 8295c5f37d..17e6fc93dc 100644 --- a/status.20x +++ b/status.20x @@ -265,6 +265,8 @@ What's new - Sort formats under Document>Settings>Output (bug 7758). +- Fix crash when changing labelwidth (bug 7873). + * ADVANCED FIND AND REPLACE -- 2.39.5