From b74c722670bfa0e17c6fe9d51ec5afc614318a05 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 1 Jul 2010 15:27:03 +0100 Subject: [PATCH] cogl-material: Don't doubly ref the parent in cogl_material_copy cogl_material_copy was taking a reference on the original texture when making a copy. However it then calls _cogl_material_set_parent on the material which also takes a reference on the parent. The second reference is cleaned up whenever _cogl_material_unparent is called and this is also called by _cogl_material_free. However, it seems that nothing was cleaning up the first reference. I think the reference is entirely unnecessary so this patch removes it. --- clutter/cogl/cogl/cogl-material.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/clutter/cogl/cogl/cogl-material.c b/clutter/cogl/cogl/cogl-material.c index e8a2a5547..b5933ba7a 100644 --- a/clutter/cogl/cogl/cogl-material.c +++ b/clutter/cogl/cogl/cogl-material.c @@ -490,8 +490,6 @@ cogl_material_copy (CoglMaterial *src) { CoglMaterial *material = g_slice_new (CoglMaterial); - cogl_object_ref (src); - material->_parent = src->_parent; material->is_weak = FALSE;