]> git.lyx.org Git - features.git/commitdiff
Backport fix for bug #7873.
authorRichard Heck <rgheck@comcast.net>
Fri, 18 Nov 2011 21:37:03 +0000 (21:37 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 18 Nov 2011 21:37:03 +0000 (21:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40213 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text2.cpp
status.20x

index ae82050fce1c5ca7b00cc83a1bf6b98ee3090ce0..e26d448a7059046b8d9e9e0474b635145c4c3e30 100644 (file)
@@ -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)
index 8295c5f37de2e2d32e215908bd80f75bae9e0469..17e6fc93dc044613342839bd16463705d0638f5d 100644 (file)
@@ -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