controller: Do not unset uninitiallized GValue

In case the property was not interpollable we might never initialize
the GValue, we should thus never unset it.
This commit is contained in:
Thibault Saunier 2016-02-02 16:35:34 +01:00 committed by Tim-Philipp Müller
parent 98aec4a963
commit 39739c015b

View file

@ -343,7 +343,8 @@ gst_direct_control_binding_finalize (GObject * object)
{
GstDirectControlBinding *self = GST_DIRECT_CONTROL_BINDING (object);
g_value_unset (&self->cur_value);
if (G_IS_VALUE (&self->cur_value))
g_value_unset (&self->cur_value);
G_OBJECT_CLASS (parent_class)->finalize (object);
}