From: Thiago Santos Date: Tue, 9 Jul 2013 01:01:58 +0000 (-0300) Subject: uridownloader: fix crash when download is null X-Git-Tag: 1.1.2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c62137b8326c1190f297e6f3d4c04d23b9614c57;p=platform%2Fupstream%2Fgst-plugins-bad.git uridownloader: fix crash when download is null Do no try to unref a NULL download attribute --- 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; }