Michael Gerz wrote:
> [EMAIL PROTECTED] schrieb:
>> Author: kuemmel
>> Date: Thu May 10 19:55:07 2007
>> New Revision: 18259
>>
>> URL: http://www.lyx.org/trac/changeset/18259
>> Log:
>> fix crash: change empty line to paragraph and press a key
>>
>> Modified:
>> lyx-devel/trunk/src/TocBackend.cpp
>> lyx-devel/trunk/src/frontends/qt4/ui/ListingsUi.ui
>>
>> Modified: lyx-devel/trunk/src/TocBackend.cpp
>> URL:
>> http://www.lyx.org/trac/file/lyx-devel/trunk/src/TocBackend.cpp?rev=18259
>> ==============================================================================
>>
>> --- lyx-devel/trunk/src/TocBackend.cpp (original)
>> +++ lyx-devel/trunk/src/TocBackend.cpp Thu May 10 19:55:07 2007
>> @@ -123,6 +123,11 @@
>>
>> void TocBackend::updateItem(ParConstIterator const & par_it)
>> {
>> + // TODO should not happen, + // a call to TocBackend::update()
>> is missing somewhere
>> + if (toc("tableofcontents").empty())
>> + return;
>> +
>>
>
> Some proper lyxerr output would be fine here.
>
> Michael
>
What is the correct debug stream, INFO?
Index: TocBackend.cpp
===================================================================
--- TocBackend.cpp (revision 18282)
+++ TocBackend.cpp (working copy)
@@ -123,10 +123,14 @@
void TocBackend::updateItem(ParConstIterator const & par_it)
{
- // TODO should not happen,
- // a call to TocBackend::update() is missing somewhere
- if (toc("tableofcontents").empty())
+ if (toc("tableofcontents").empty()) {
+ // TODO should not happen,
+ // a call to TocBackend::update() is missing somewhere
+ LYXERR(Debug::INFO)
+ << "TocBackend.cpp: TocBackend::updateItem"
+ << "called but the TOC is empty" << std::endl;
return;
+ }
BufferParams const & bufparams = buffer_->params();
const int min_toclevel = bufparams.getTextClass().min_toclevel();
--
Peter Kümmel