Op 18-11-2011 22:34, rgh...@lyx.org schreef:
Author: rgheck
Date: Fri Nov 18 22:34:40 2011
New Revision: 40212
URL: http://www.lyx.org/trac/changeset/40212

Log:
Fix bug #7873. Patch is sufficiently explanatory.

The patch isn't explanatory enough that I would guess that this fixes a crash when changing labelwidth.

Modified:
    lyx-devel/trunk/src/Text2.cpp

Modified: lyx-devel/trunk/src/Text2.cpp
==============================================================================
--- lyx-devel/trunk/src/Text2.cpp       Fri Nov 18 21:48:54 2011        (r40211)
+++ lyx-devel/trunk/src/Text2.cpp       Fri Nov 18 22:34:40 2011        (r40212)
@@ -445,8 +445,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)

Reply via email to