]> git.lyx.org Git - features.git/commitdiff
* InsetTabular.cpp: do not attempt to access an empty DocIterator (bug 6810).
authorJürgen Spitzmüller <spitz@lyx.org>
Sat, 14 Aug 2010 14:32:52 +0000 (14:32 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Sat, 14 Aug 2010 14:32:52 +0000 (14:32 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35148 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetTabular.cpp

index 806d8256f29f7c96a2e7d481f9983ce936e1e514..c99b29f6c6baa50e208d1978432d8375f014a80c 100644 (file)
@@ -523,11 +523,11 @@ InsetTableCell splitCell(InsetTableCell & head, docstring const align_d, bool &
 
        pit_type const psize = head.paragraphs().front().size();
        hassep = dit;
-       if (hassep)
+       if (hassep) {
                head.paragraphs().front().eraseChars(dit.pos(), psize, false);
-
-       tail.paragraphs().front().eraseChars(0, 
-               dit.pos() < psize ? dit.pos() + 1 : psize, false);
+               tail.paragraphs().front().eraseChars(0, 
+                       dit.pos() < psize ? dit.pos() + 1 : psize, false);
+       }
 
        return tail;
 }