Andre Poenitz wrote:
On Tue, Feb 19, 2008 at 08:32:30AM +0100, Abdelrazak Younes wrote:
rgheck wrote:
Do something to lyx2lyx to cause a syntax error. Now try to open a file
that needs converting. BOOM!
Does this help? Of course inset_iterator_begin() should not crash to begin
with.
Author: younes
Date: Tue Feb 19 08:31:02 2008
New Revision: 23063
URL: http://www.lyx.org/trac/changeset/23063
Log:
Buffer::resetChildDocuments() Check for Buffer emptiness before proceeding.
Abdel.
Modified:
lyx-devel/trunk/src/Buffer.cpp
Modified: lyx-devel/trunk/src/Buffer.cpp
URL: http://www.lyx.org/trac/file/lyx-devel/trunk/src/Buffer.cpp?rev=23063
==============================================================================
--- lyx-devel/trunk/src/Buffer.cpp (original)
+++ lyx-devel/trunk/src/Buffer.cpp Tue Feb 19 08:31:02 2008
@@ -2312,6 +2312,9 @@
void Buffer::resetChildDocuments(bool close_them) const
{
+ if (text().empty())
+ return;
+
for (InsetIterator it = inset_iterator_begin(inset()); it; ++it) {
if (it->lyxCode() != INCLUDE_CODE)
continue;
There was a time when we required at least one paragraph per LyXText.
Has this changed?
I guess so, yes. Adding an empty paragraph in the Text ctor is probably
the best solution.
Abdel.