[cairo-commit] cairo/src cairo-image-surface.c,1.53,1.54
Carl Worth
commit at pdx.freedesktop.org
Thu Jul 28 10:47:42 PDT 2005
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv6163/src
Modified Files:
cairo-image-surface.c
Log Message:
* src/cairo-image-surface.c: (cairo_image_surface_get_width),
(cairo_image_surface_get_height): Fix to call _cairo_error and
return 0 on surface-type mismatch.
Index: cairo-image-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-image-surface.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- cairo-image-surface.c 28 Jul 2005 16:54:03 -0000 1.53
+++ cairo-image-surface.c 28 Jul 2005 17:47:40 -0000 1.54
@@ -255,6 +255,11 @@
{
cairo_image_surface_t *image_surface = (cairo_image_surface_t *) surface;
+ if (!_cairo_surface_is_image (surface)) {
+ _cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
+ return 0;
+ }
+
return image_surface->width;
}
@@ -271,6 +276,11 @@
{
cairo_image_surface_t *image_surface = (cairo_image_surface_t *) surface;
+ if (!_cairo_surface_is_image (surface)) {
+ _cairo_error (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
+ return 0;
+ }
+
return image_surface->height;
}
More information about the cairo-commit
mailing list