]> git.lyx.org Git - lyx.git/blobdiff - src/output_linuxdoc.C
fix crash after removing a table row (again due to uncorrected cursor
[lyx.git] / src / output_linuxdoc.C
index 44e1cd6ee9b5fe848252120eaaed1cd84613ded9..060593c0e506b756fa8f6facc38ced0628852d64 100644 (file)
@@ -23,9 +23,6 @@
 
 #include <stack>
 
-#ifdef HAVE_LOCALE
-#endif
-
 using std::ostream;
 using std::stack;
 using std::vector;
@@ -46,7 +43,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";