]> git.lyx.org Git - features.git/commitdiff
Fix bug #7873. Patch is sufficiently explanatory.
authorRichard Heck <rgheck@comcast.net>
Fri, 18 Nov 2011 21:34:40 +0000 (21:34 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 18 Nov 2011 21:34:40 +0000 (21:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40212 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text2.cpp

index b7b9f640880ec7a8d3dfd63f8cdb8ba2a534356f..14b03cfec5db6870460faf4d0a02f1a95ee7dd5f 100644 (file)
@@ -445,8 +445,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)