[cairo] [patch] image: increase reference count for parent

Henry (Yu) Song - SISA hsong at sisa.samsung.com
Tue Jan 29 08:21:58 PST 2013


>From 994a83e34b61d4a758c374849f2d7ac6f94aca0b Mon Sep 17 00:00:00 2001
From: Henry Song <henry.song at samsung.com>
Date: Tue, 29 Jan 2013 08:19:52 -0800
Subject: [PATCH] image: increase reference of parent when setting parent

---
 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 743d5fd..a1662f2 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


More information about the cairo mailing list