controller: Do not unset uninitiallized GValue
authorThibault Saunier <tsaunier@gnome.org>
Tue, 2 Feb 2016 15:35:34 +0000 (16:35 +0100)
committerThibault Saunier <tsaunier@gnome.org>
Tue, 2 Feb 2016 18:51:56 +0000 (19:51 +0100)
In case the property was not interpollable we might never initialize
the GValue, we should thus never unset it.

libs/gst/controller/gstdirectcontrolbinding.c

index 44eb405..2e0b9f1 100644 (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);
 }