summaryrefslogtreecommitdiff
path: root/source/fitz/svg-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/svg-device.c')
-rw-r--r--source/fitz/svg-device.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/fitz/svg-device.c b/source/fitz/svg-device.c
index d0efc261..6f3923ca 100644
--- a/source/fitz/svg-device.c
+++ b/source/fitz/svg-device.c
@@ -726,10 +726,9 @@ svg_dev_fill_shade(fz_device *dev, fz_shade *shade, const fz_matrix *ctm, float
if (dev->scissor_len == 0)
return;
- if (fz_is_infinite_rect(&shade->bbox))
- fz_round_rect(&bbox, &dev->scissor[dev->scissor_len-1]);
- else
- fz_round_rect(&bbox, fz_intersect_rect(fz_bound_shade(ctx, shade, ctm, &rect), &dev->scissor[dev->scissor_len-1]));
+ fz_round_rect(&bbox, fz_intersect_rect(fz_bound_shade(ctx, shade, ctm, &rect), &dev->scissor[dev->scissor_len-1]));
+ if (fz_is_empty_irect(&bbox))
+ return;
pix = fz_new_pixmap_with_bbox(ctx, fz_device_rgb(ctx), &bbox);
fz_clear_pixmap(ctx, pix);