[Cairo] [PATCH] fix bugs in cairo_surface.c

graydon hoare graydon at redhat.com
Mon Sep 29 09:09:53 PDT 2003


hi,

this fixes a couple of bugs in cairo_surface.c. the first hunk removes
a premature freeing (?!) the pixmap being created in
cairo_surface_create_similar_solid; the second corrects the parameters
passed in from _cairo_surface_composite.

-graydon


--- cairo_surface.c
+++ cairo_surface.c
@@ -276,7 +276,6 @@
 						     NULL,
 						     format,
 						     DefaultColormap (dpy, scr));
-	XFreePixmap (surface->dpy, pix);
     } else {
 	char *data;
 	int stride;
@@ -618,7 +617,7 @@
 	    cairo_matrix_t matrix;
 	    src_on_server = cairo_surface_create_similar (dst, CAIRO_FORMAT_ARGB32,
 							  IcImageGetWidth (src->icimage),
-							  IcImageGetWidth (src->icimage));
+							  IcImageGetHeight (src->icimage));
 	    if (src_on_server == NULL)
 		return;
 





More information about the cairo mailing list