summaryrefslogtreecommitdiff
path: root/draw
diff options
context:
space:
mode:
Diffstat (limited to 'draw')
-rw-r--r--draw/draw_device.c3
-rw-r--r--draw/draw_scale.c10
2 files changed, 1 insertions, 12 deletions
diff --git a/draw/draw_device.c b/draw/draw_device.c
index ab9d18e1..de81ccec 100644
--- a/draw/draw_device.c
+++ b/draw/draw_device.c
@@ -1582,9 +1582,6 @@ fz_draw_free_user(fz_device *devp)
state--;
}
while(--dev->top > 0);
- fz_drop_pixmap(ctx, dev->stack[0].mask);
- fz_drop_pixmap(ctx, dev->stack[0].dest);
- fz_drop_pixmap(ctx, dev->stack[0].shape);
}
if (dev->stack != &dev->init_stack[0])
fz_free(ctx, dev->stack);
diff --git a/draw/draw_scale.c b/draw/draw_scale.c
index fb7caffd..aceec939 100644
--- a/draw/draw_scale.c
+++ b/draw/draw_scale.c
@@ -349,16 +349,8 @@ add_weight(fz_weights *weights, int j, int i, fz_scale_filter *filter,
weight = (int)(256*f+0.5f);
/* Ensure i is in range */
- if (i < 0)
- {
- i = 0;
+ if (i < 0 || i >= src_w)
return;
- }
- else if (i >= src_w)
- {
- i = src_w-1;
- return;
- }
if (weight == 0)
{
/* We add a fudge factor here to allow for extreme downscales