[patch] add reference count for image surface->parent

"Henry (Yu) Song - SISA" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <3955FA337689574EB32F94B12A7E6E9E246BAC41@sisaex01sj>
From 53c61cf343ff0ce80845db526fc0bef3e6c8066c Mon Sep 17 00:00:00 2001
From: Henry Song <[email protected]>
Date: Thu, 30 Aug 2012 16:10:08 -0700
Subject: [PATCH] add add a reference count to image_surface->parent, this
 fixes crashes map-all-to-image, map-bit-to-image,
 map-to-image-fill and xcb-huge-image-shm test cases, where
 the target surface does not support BGRA/BGR,

---
 src/cairo-image-surface-inline.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/cairo-image-surface-inline.h b/src/cairo-image-surface-inline.h
index f6bed71..1294345 100644
--- a/src/cairo-image-surface-inline.h
+++ b/src/cairo-image-surface-inline.h
@@ -54,6 +54,7 @@ _cairo_image_surface_set_parent (cairo_image_surface_t *image,
 				 cairo_surface_t *parent)
 {
     image->parent = parent;
+    cairo_surface_reference (parent);
 }
 
 static inline cairo_bool_t
-- 
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.