From c62137b8326c1190f297e6f3d4c04d23b9614c57 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Mon, 8 Jul 2013 22:01:58 -0300 Subject: [PATCH] uridownloader: fix crash when download is null Do no try to unref a NULL download attribute --- gst-libs/gst/uridownloader/gsturidownloader.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/uridownloader/gsturidownloader.c b/gst-libs/gst/uridownloader/gsturidownloader.c index f068630..28e0aff 100644 --- a/gst-libs/gst/uridownloader/gsturidownloader.c +++ b/gst-libs/gst/uridownloader/gsturidownloader.c @@ -426,8 +426,10 @@ gst_uri_downloader_fetch_uri_with_range (GstUriDownloader * downloader, ret = gst_element_set_state (downloader->priv->urisrc, GST_STATE_PLAYING); GST_OBJECT_LOCK (downloader); if (ret == GST_STATE_CHANGE_FAILURE) { - g_object_unref (downloader->priv->download); - downloader->priv->download = NULL; + if (downloader->priv->download) { + g_object_unref (downloader->priv->download); + downloader->priv->download = NULL; + } goto quit; } -- 2.7.4