Index: ChangeLog =================================================================== RCS file: /cvs/cairo/cairo/ChangeLog,v retrieving revision 1.929 diff -u -p -r1.929 ChangeLog --- ChangeLog 21 Aug 2005 15:24:41 -0000 1.929 +++ ChangeLog 21 Aug 2005 15:51:08 -0000 @@ -1,5 +1,11 @@ 2005-08-21 Owen Taylor + * src/cairo-surface.c (_cairo_surface_clone_similar): Fix the + handling of backend->clone_similar == NULL. (#4161, + Christian Biesinger) + +2005-08-21 Owen Taylor + * src/cairo-surface.c: Improve the documentation of internal functions. (Based on a patch from Christian Biesinger, #4162) Index: src/cairo-surface.c =================================================================== RCS file: /cvs/cairo/cairo/src/cairo-surface.c,v retrieving revision 1.95 diff -u -p -r1.95 cairo-surface.c --- src/cairo-surface.c 21 Aug 2005 15:24:41 -0000 1.95 +++ src/cairo-surface.c 21 Aug 2005 15:51:08 -0000 @@ -690,11 +690,12 @@ _cairo_surface_clone_similar (cairo_surf if (surface->finished) return CAIRO_STATUS_SURFACE_FINISHED; - if (surface->backend->clone_similar) { - status = surface->backend->clone_similar (surface, src, clone_out); - if (status != CAIRO_INT_STATUS_UNSUPPORTED) - return status; - } + if (surface->backend->clone_similar == NULL) + return CAIRO_INT_STATUS_UNSUPPORTED; + + status = surface->backend->clone_similar (surface, src, clone_out); + if (status != CAIRO_INT_STATUS_UNSUPPORTED) + return status; status = _cairo_surface_acquire_source_image (src, &image, &image_extra); if (status != CAIRO_STATUS_SUCCESS)