discoverer: Do not try to unref the bus if it has not been set yet
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Tue, 15 Nov 2016 18:12:12 +0000 (15:12 -0300)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Tue, 15 Nov 2016 18:22:45 +0000 (15:22 -0300)
It might happen if creation of the discoverer failed

gst-libs/gst/pbutils/gstdiscoverer.c

index d155323..ff79471 100644 (file)
@@ -393,7 +393,8 @@ gst_discoverer_dispose (GObject * obj)
 
     /* pipeline was set to NULL in _reset */
     gst_object_unref (dc->priv->pipeline);
-    gst_object_unref (dc->priv->bus);
+    if (dc->priv->bus)
+      gst_object_unref (dc->priv->bus);
 
     dc->priv->pipeline = NULL;
     dc->priv->uridecodebin = NULL;