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:
Bryce Harrington 2014-10-03 11:52:32 -07:00
parent 03756e042a
commit d9ba8337ab

View file

@ -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));
}