From e2c44bb179dc532c319ee72a9711e9178a940a0a Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 1 Jun 2004 17:54:33 +0000 Subject: [PATCH] One line fix to bug 1513. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8792 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/output_linuxdoc.C | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ac65455113..33e46020d8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-06-01 Angus Leeming + + * output_linuxdoc.C (linuxdocParagraphs): Check that the paragraph + contains data before calling isInset(0). (Bug 1513.) + 2004-06-01 Georg Baum * exporter.C (checkOverwrite): new method diff --git a/src/output_linuxdoc.C b/src/output_linuxdoc.C index 44e1cd6ee9..dd975cf305 100644 --- a/src/output_linuxdoc.C +++ b/src/output_linuxdoc.C @@ -46,7 +46,7 @@ void linuxdocParagraphs(Buffer const & buf, for (; pit != pend; ++pit) { LyXLayout_ptr const & style = pit->layout(); // treat 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";