[cairo-commit] src/cairo-svg-surface.c

Emmanuel Pacaud emmanuel at kemper.freedesktop.org
Fri May 5 02:10:09 PDT 2006


 src/cairo-svg-surface.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

New commits:
diff-tree fb269aac0887711298241113717aa8bddecbd097 (from c399b7a04777823fc32c65020616b39196795214)
Author: Emmanuel Pacaud <emmanuel.pacaud at free.fr>
Date:   Fri May 5 11:10:02 2006 +0200

    SVG: Sets something sane in width and height if acquire source image fails.
    
    In composite_image_pattern.

diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index dcbdf5f..29cdfa9 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -659,11 +659,16 @@ emit_composite_image_pattern (xmlNodePtr
     void *image_extra;
 
     status = _cairo_surface_acquire_source_image (surface, &image, &image_extra);
-    if (status)
+    if (status)	 {
+	if (width != NULL)
+	    *width = 0;
+	if (height != NULL)
+	    *height = 0;
 	return NULL;
+    }
 
     status = _cairo_surface_base64_encode (surface, &image_buffer);
-    if (status)
+    if (status) 
 	goto BAIL;
 
     child = xmlNewChild (node, NULL, CC2XML ("image"), NULL);


More information about the cairo-commit mailing list