Bennett Helm wrote:
> On May 9, 2007, at 3:45 PM, Peter Kümmel wrote:
>
>> Bennett Helm wrote:
>>> Patrick De Visschere noted on the User's list that:
>>>
>>>> If you change the environment of a blanco line (from Standard) to
>>>> Paragraph and then type text on the line LyX crashes.
>>>
>>> I can confirm this on current svn. Here's the backtrace:
>>
>> Here too, (Windows). Attached patch fixes it.
>> Could you test it on the Mac?
>
> Works for me as well. Thanks!
>
> Bennett
This patch is better, but is it the best way to fix it?
Any TOC experts?
--
Peter Kümmel
Index: src/TocBackend.cpp
===================================================================
--- src/TocBackend.cpp (revision 18243)
+++ src/TocBackend.cpp (working copy)
@@ -123,6 +123,9 @@
void TocBackend::updateItem(ParConstIterator const & par_it)
{
+ if (toc("tableofcontents").empty())
+ return;
+
BufferParams const & bufparams = buffer_->params();
const int min_toclevel = bufparams.getTextClass().min_toclevel();