discoverer: Do not try to unref the bus if it has not been set yet

It might happen if creation of the discoverer failed
This commit is contained in:
Thibault Saunier 2016-11-15 15:12:12 -03:00
parent f1562053fe
commit 0c0dfbd455

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