Author: rgheck
Date: Fri Nov 18 22:37:03 2011
New Revision: 40213
URL: http://www.lyx.org/trac/changeset/40213
Log:
Backport fix for bug #7873.
Modified:
lyx-devel/branches/BRANCH_2_0_X/src/Text2.cpp
lyx-devel/branches/BRANCH_2_0_X/status.20x
Modified: lyx-devel/branches/BRANCH_2_0_X/src/Text2.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/src/Text2.cpp Fri Nov 18 22:34:40
2011 (r40212)
+++ lyx-devel/branches/BRANCH_2_0_X/src/Text2.cpp Fri Nov 18 22:37:03
2011 (r40213)
@@ -446,8 +446,11 @@
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)
Modified: lyx-devel/branches/BRANCH_2_0_X/status.20x
==============================================================================
--- lyx-devel/branches/BRANCH_2_0_X/status.20x Fri Nov 18 22:34:40 2011
(r40212)
+++ lyx-devel/branches/BRANCH_2_0_X/status.20x Fri Nov 18 22:37:03 2011
(r40213)
@@ -265,6 +265,8 @@
- Sort formats under Document>Settings>Output (bug 7758).
+- Fix crash when changing labelwidth (bug 7873).
+
* ADVANCED FIND AND REPLACE