r17821 by jghali - fix potential crashes with broken pattern imported from pdf
scribus-commit
scribus-commit at lists.scribus.net
Fri Oct 26 21:45:21 UTC 2012
Author: jghali
Date: Fri Oct 26 21:45:21 2012
New Revision: 17821
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17821
Log:
fix potential crashes with broken pattern imported from pdf
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17821&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Fri Oct 26 21:45:21 2012
@@ -4642,6 +4642,8 @@
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = docPatterns[patterns[c]];
+ if (pa.items.count() <= 0)
+ continue;
for (int o = 0; o < pa.items.count(); o++)
{
QList<PageItem*> allItems;
@@ -9638,6 +9640,8 @@
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = docPatterns[patterns[c]];
+ if (pa.items.count() <= 0)
+ continue;
for (int o = 0; o < pa.items.count(); o++)
{
PageItem *currItem = pa.items.at(o);
More information about the scribus-commit
mailing list