From 9bfa9df2bb8557623df7c561613ea6eaa2a67cdd Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Thu, 9 Nov 2017 20:52:36 +1030 Subject: ps: fix padded image crash --- src/cairo-ps-surface.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/cairo-ps-surface.c') diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index 154c854b0..13b56730b 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -2007,11 +2007,9 @@ _cairo_ps_surface_create_padded_image_from_image (cairo_ps_surface_t * _cairo_fixed_integer_floor(box.p2.y) > w || _cairo_fixed_integer_floor(box.p2.y) > h) { - pad_image = - _cairo_image_surface_create_with_pixman_format (NULL, - source->pixman_format, - rect.width, rect.height, - 0); + pad_image = _cairo_image_surface_create_with_content (source->base.content, + rect.width, + rect.height); if (pad_image->status) return pad_image->status; -- cgit v1.2.1