mirror of
https://github.com/brl/mutter.git
synced 2025-03-03 19:58:10 +00:00
attribute: Only unref buffer for buffered attributes
constant attributes don't have a corresponding buffer so _cogl_attribute_free shouldn't try to unref it. Also, for good measure, in the case of constant attributes we should call _cogl_boxed_value_destroy() (although currently we know there is no dynamic data associated with the boxed values). (cherry picked from commit 89d6dc90d10c59676e0deed87c2c15a0c9712737)
This commit is contained in:
parent
6e379fb54e
commit
63db64f426
@ -534,7 +534,10 @@ _cogl_attribute_immutable_unref (CoglAttribute *attribute)
|
|||||||
static void
|
static void
|
||||||
_cogl_attribute_free (CoglAttribute *attribute)
|
_cogl_attribute_free (CoglAttribute *attribute)
|
||||||
{
|
{
|
||||||
cogl_object_unref (attribute->d.buffered.attribute_buffer);
|
if (attribute->is_buffered)
|
||||||
|
cogl_object_unref (attribute->d.buffered.attribute_buffer);
|
||||||
|
else
|
||||||
|
_cogl_boxed_value_destroy (&attribute->d.constant.boxed);
|
||||||
|
|
||||||
g_slice_free (CoglAttribute, attribute);
|
g_slice_free (CoglAttribute, attribute);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user