summaryrefslogtreecommitdiffstats
path: root/src/gradient-chemistry.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2014-07-27 11:44:25 +0000
committer~suv <suv-sf@users.sourceforge.net>2014-07-27 11:44:25 +0000
commit3ebd8c4550a8c8bf944e18fec8f3df3d2da5c1af (patch)
tree981526f208f9998ea858cfd55a2c946f72dcb02e /src/gradient-chemistry.cpp
parentupdate to trunk (r13454) (diff)
parentProperly fix 1309050, revert incorrect fix for 601336 (diff)
downloadinkscape-3ebd8c4550a8c8bf944e18fec8f3df3d2da5c1af.tar.gz
inkscape-3ebd8c4550a8c8bf944e18fec8f3df3d2da5c1af.zip
update to trunk (r13472)
(bzr r13398.1.5)
Diffstat (limited to 'src/gradient-chemistry.cpp')
-rw-r--r--src/gradient-chemistry.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index 89b7968fc..27f4d7a98 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -1296,6 +1296,10 @@ Geom::Point getGradientCoords(SPItem *item, GrPointType point_type, guint point_
break;
case POINT_LG_MID:
{
+ if (lg->vector.stops.size() < point_i) {
+ g_message("POINT_LG_MID bug trigger, see LP bug #453067");
+ break;
+ }
gdouble offset = lg->vector.stops.at(point_i).offset;
p = (1-offset) * Geom::Point(lg->x1.computed, lg->y1.computed) + offset * Geom::Point(lg->x2.computed, lg->y2.computed);
}
@@ -1321,12 +1325,20 @@ Geom::Point getGradientCoords(SPItem *item, GrPointType point_type, guint point_
break;
case POINT_RG_MID1:
{
+ if (rg->vector.stops.size() < point_i) {
+ g_message("POINT_RG_MID1 bug trigger, see LP bug #453067");
+ break;
+ }
gdouble offset = rg->vector.stops.at(point_i).offset;
p = (1-offset) * Geom::Point (rg->cx.computed, rg->cy.computed) + offset * Geom::Point(rg->cx.computed + rg->r.computed, rg->cy.computed);
}
break;
case POINT_RG_MID2:
{
+ if (rg->vector.stops.size() < point_i) {
+ g_message("POINT_RG_MID2 bug trigger, see LP bug #453067");
+ break;
+ }
gdouble offset = rg->vector.stops.at(point_i).offset;
p = (1-offset) * Geom::Point (rg->cx.computed, rg->cy.computed) + offset * Geom::Point(rg->cx.computed, rg->cy.computed - rg->r.computed);
}