]> git.lyx.org Git - features.git/commitdiff
One line fix to bug 1513.
authorAngus Leeming <leeming@lyx.org>
Tue, 1 Jun 2004 17:54:33 +0000 (17:54 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 1 Jun 2004 17:54:33 +0000 (17:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8792 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/output_linuxdoc.C

index ac65455113d7d4f2d88cb829f2c72eb414b795bc..33e46020d83f5aab70cc47b33c33baace53edc9a 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-01  Angus Leeming  <leeming@lyx.org>
+
+       * output_linuxdoc.C (linuxdocParagraphs): Check that the paragraph
+       contains data before calling isInset(0). (Bug 1513.)
+
 2004-06-01  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * exporter.C (checkOverwrite): new method
index 44e1cd6ee9b5fe848252120eaaed1cd84613ded9..dd975cf3057c047f5236ba32c8378400673a944d 100644 (file)
@@ -46,7 +46,7 @@ void linuxdocParagraphs(Buffer const & buf,
        for (; pit != pend; ++pit) {
                LyXLayout_ptr const & style = pit->layout();
                // treat <toc> as a special case for compatibility with old code
-               if (pit->isInset(0)) {
+               if (!pit->empty() && pit->isInset(0)) {
                        InsetBase const * inset = pit->getInset(0);
                        if (inset->lyxCode() == InsetOld::TOC_CODE) {
                                string const temp = "toc";