r19477 by jghali - #12654: Scribus crashes after color change "due to Signal 11"
scribus-commit
scribus-commit at lists.scribus.net
Thu Sep 4 19:43:29 UTC 2014
Author: jghali
Date: Thu Sep 4 19:43:29 2014
New Revision: 19477
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19477
Log:
#12654: Scribus crashes after color change "due to Signal 11"
Modified:
trunk/Scribus/scribus/scribusdoc.cpp
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19477&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Thu Sep 4 19:43:29 2014
@@ -10126,6 +10126,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);
@@ -10266,6 +10268,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);
@@ -10294,19 +10298,19 @@
updated = true;
}
allItems.clear();
- PageItem *ite = pa.items.at(0);
- double minx = std::numeric_limits<double>::max();
- double miny = std::numeric_limits<double>::max();
- double maxx = -std::numeric_limits<double>::max();
- double maxy = -std::numeric_limits<double>::max();
- double x1, x2, y1, y2;
- ite->getVisualBoundingRect(&x1, &y1, &x2, &y2);
- minx = qMin(minx, x1);
- miny = qMin(miny, y1);
- maxx = qMax(maxx, x2);
- maxy = qMax(maxy, y2);
- docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
- }
+ }
+ PageItem *ite = pa.items.at(0);
+ double minx = std::numeric_limits<double>::max();
+ double miny = std::numeric_limits<double>::max();
+ double maxx = -std::numeric_limits<double>::max();
+ double maxy = -std::numeric_limits<double>::max();
+ double x1, x2, y1, y2;
+ ite->getVisualBoundingRect(&x1, &y1, &x2, &y2);
+ minx = qMin(minx, x1);
+ miny = qMin(miny, y1);
+ maxx = qMax(maxx, x2);
+ maxy = qMax(maxy, y2);
+ docPatterns[patterns[c]].pattern = ite->DrawObj_toImage(qMin(qMax(maxx - minx, maxy - miny), 500.0));
}
if (updated)
{
@@ -10628,6 +10632,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