Index: src/cairo-surface.c =================================================================== --- src/cairo-surface.c (revision 36730) +++ src/cairo-surface.c (revision 36731) @@ -234,6 +234,9 @@ if (surface == NULL) surface = cairo_image_surface_create (format, width, height); + if (!surface || surface->status) + return (cairo_surface_t*) &_cairo_surface_nil; + cairo_surface_get_font_options (other, &options); _cairo_surface_set_font_options (surface, &options);