r16543 by jghali - #9896 : crash when layouting very long text chain
scribus-commit
scribus-commit at lists.scribus.net
Thu Mar 31 23:09:50 CEST 2011
Author: jghali
Date: Thu Mar 31 21:09:50 2011
New Revision: 16543
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16543
Log:
#9896 : crash when layouting very long text chain
Modified:
trunk/Scribus/scribus/pageitem_textframe.cpp
Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16543&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Thu Mar 31 21:09:50 2011
@@ -905,10 +905,14 @@
// qDebug("textframe: len=%d, going back", itemText.length());
invalid = false;
PageItem_TextFrame* prevInChain = dynamic_cast<PageItem_TextFrame*>(BackBox);
- if (!prevInChain)
- qDebug() << QString("layout(): backBox=%1 is no textframe!!").arg((ulong)BackBox);
- else
- BackBox->layout();
+ while (prevInChain && prevInChain->invalid)
+ {
+ if (!prevInChain->BackBox || !prevInChain->BackBox->invalid)
+ break;
+ prevInChain = dynamic_cast<PageItem_TextFrame*>(prevInChain->BackBox);
+ }
+ if (prevInChain && prevInChain->invalid)
+ prevInChain->layout();
// #9592 : warning, BackBox->layout() may not layout BackBox next box
if (!invalid)
return;
More information about the scribus-commit
mailing list