diff options
author | Henry Song <henry.song@samsung.com> | 2014-05-14 18:52:01 -0700 |
---|---|---|
committer | nisanthmp <nisanth.mp@samsung.com> | 2015-06-12 12:23:35 +0530 |
commit | f01e974f5b2137c314970f401bc154d2ae3f5cb9 (patch) | |
tree | 4a3aa6d3399e0d836b3f2a68e84a8d0eaa37eda4 | |
parent | f41fc0c54cac4cb542e29da316458e62d3593b37 (diff) | |
download | cairo-f01e974f5b2137c314970f401bc154d2ae3f5cb9.tar.gz cairo-f01e974f5b2137c314970f401bc154d2ae3f5cb9.tar.bz2 cairo-f01e974f5b2137c314970f401bc154d2ae3f5cb9.zip |
shadow: release device only if it is valid
-rw-r--r-- | src/cairo-surface-shadow.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/cairo-surface-shadow.c b/src/cairo-surface-shadow.c index 47f58236d..d3542cf25 100644 --- a/src/cairo-surface-shadow.c +++ b/src/cairo-surface-shadow.c @@ -316,7 +316,8 @@ _cairo_ensure_shadow_surface (cairo_surface_t *target, content, width_out, height_out); - _cairo_surface_release_device_reference (shadow_surface); + if (shadow_surface->device) + _cairo_surface_release_device_reference (shadow_surface); } shadow_surface_extents->x = 0; @@ -2019,7 +2020,8 @@ _cairo_surface_inset_shadow_glyphs (cairo_surface_t *target, content, shadow_width, shadow_height); - _cairo_surface_release_device_reference (shadow_surface); + if (shadow_surface->device) + _cairo_surface_release_device_reference (shadow_surface); } if (! shadow_surface || unlikely (shadow_surface->status)) goto FINISH; @@ -2038,7 +2040,8 @@ _cairo_surface_inset_shadow_glyphs (cairo_surface_t *target, CAIRO_CONTENT_COLOR_ALPHA, shadow_surface_extents.width, shadow_surface_extents.height); - _cairo_surface_release_device_reference (mask_surface); + if (mask_surface->device) + _cairo_surface_release_device_reference (mask_surface); } if (! mask_surface || unlikely (mask_surface->status)) goto FINISH; @@ -2221,7 +2224,8 @@ _cairo_surface_shadow_glyphs (cairo_surface_t *target, content, shadow_width, shadow_height); - _cairo_surface_release_device_reference (shadow_surface); + if (shadow_surface->device) + _cairo_surface_release_device_reference (shadow_surface); } if (! shadow_surface || unlikely (shadow_surface->status)) goto FINISH; |