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.
This commit is contained in:
Neil Roberts 2010-07-01 15:27:03 +01:00
parent 137d38962a
commit 7961b1c93d

View File

@ -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;