summaryrefslogtreecommitdiff
path: root/src/cairo-quartz-surface.c
diff options
context:
space:
mode:
authorJonathan Kew <jfkthame@gmail.com>2022-10-19 14:59:45 +0100
committerJonathan Kew <jfkthame@gmail.com>2022-10-19 14:59:45 +0100
commit77aac45db742ed6dd5072d6296ac265ad11e496c (patch)
tree8ee2fa4e45d76a8a717ef2edef56e5a01a58064c /src/cairo-quartz-surface.c
parent2cfd08664d080ff22e357a5feeca9bc29ec1823c (diff)
downloadcairo-77aac45db742ed6dd5072d6296ac265ad11e496c.tar.gz
Ensure pbounds.size is initialized even in EXTEND_NONE mode.
Since the if/else was replaced by a switch() here in https://gitlab.freedesktop.org/cairo/cairo/-/commit/2e0075e265155ff144ced23ff87c4bed4cdfbc27, the size field of pbounds is not being set in the EXTEND_NONE case, which means we end up passing uninitialized values to CGPatternCreate.
Diffstat (limited to 'src/cairo-quartz-surface.c')
-rw-r--r--src/cairo-quartz-surface.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 6676dc960..4cb8d04d9 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -901,7 +901,7 @@ _cairo_quartz_cairo_repeating_surface_pattern_to_quartz (cairo_quartz_surface_t
switch (spattern->base.extend) {
case CAIRO_EXTEND_NONE:
- break;
+ case CAIRO_EXTEND_PAD:
case CAIRO_EXTEND_REPEAT:
pbounds.size.width = extents.width;
pbounds.size.height = extents.height;
@@ -911,10 +911,6 @@ _cairo_quartz_cairo_repeating_surface_pattern_to_quartz (cairo_quartz_surface_t
pbounds.size.height = 2.0 * extents.height;
info->do_reflect = TRUE;
break;
- case CAIRO_EXTEND_PAD:
- pbounds.size.width = extents.width;
- pbounds.size.height = extents.height;
- break;
}
rw = pbounds.size.width;
rh = pbounds.size.height;