mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-10 07:00:24 +01:00
quartz: Check for quartz surface type before conversion
Fixes the following warning introduced in a recent commit reported by
~suv:
CC cairo-quartz-image-surface.lo
cairo-quartz-image-surface.c:382:37: warning: incompatible pointer types
passing 'cairo_quartz_image_surface_t *'
(aka 'struct cairo_quartz_image_surface *') to parameter of type
'const cairo_surface_t *' (aka 'const struct _cairo_surface *')
[-Wincompatible-pointer-types]
if (! _cairo_surface_is_quartz (surface)) {
^~~~~~~
./cairo-quartz-private.h:87:50: note: passing argument to parameter 'surface' here
_cairo_surface_is_quartz (const cairo_surface_t *surface);
References: https://bugs.freedesktop.org/show_bug.cgi?id=84569
Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
This commit is contained in:
parent
03756e042a
commit
d9ba8337ab
1 changed files with 1 additions and 1 deletions
|
|
@ -379,7 +379,7 @@ cairo_quartz_image_surface_get_image (cairo_surface_t *asurface)
|
|||
cairo_quartz_image_surface_t *surface = (cairo_quartz_image_surface_t*) asurface;
|
||||
|
||||
/* Throw an error for a non-quartz surface */
|
||||
if (! _cairo_surface_is_quartz (surface)) {
|
||||
if (! _cairo_surface_is_quartz (asurface)) {
|
||||
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue