--- cairo-surface.c.orig 2006-12-14 14:39:03.000000000 +0500 +++ cairo-surface.c 2007-02-02 10:16:32.000000000 +0500 @@ -284,8 +284,8 @@ if (other->backend->create_similar) surface = other->backend->create_similar (other, content, width, height); - if (!surface) - surface = cairo_image_surface_create (format, width, height); + if (surface->status) + return (cairo_surface_t*) &_cairo_surface_nil; cairo_surface_get_font_options (other, &options); _cairo_surface_set_font_options (surface, &options);