[patch 2/2] image: do not claim ownership of image data

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E434AF883@sisaex01sj>
From 40db98e1dc3b882c0f071e0b6be35b5e6a563327 Mon Sep 17 00:00:00 2001
From: Henry Song <[email protected]>
Date: Fri, 1 Feb 2013 13:23:19 -0800
Subject: [PATCH 2/2] image: Do not claim ownership of the image data

In _cairo_image_surface_create_from_image(), once pixman_image is
created, the pixman owns the data, cairo_image_surface should not
claim the ownership of created image data
---
 src/cairo-image-surface.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 49f6e18..c6522a4 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -1121,6 +1121,7 @@ _cairo_image_surface_create_from_image (cairo_image_surface_t *other,
 	_cairo_image_surface_create_for_pixman_image (image, format);
     if (unlikely (surface->base.status)) {
 	status = surface->base.status;
+	mem = NULL;
 	goto cleanup_image;
     }
 
@@ -1131,7 +1132,6 @@ _cairo_image_surface_create_from_image (cairo_image_surface_t *other,
                               0, 0,
                               width, height);
     surface->base.is_clear = FALSE;
-    surface->owns_data = mem != NULL;
 
     return surface;
 
-- 
1.7.9.5
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.