diff options
author | Thiago Santos <thiago.sousa.santos@collabora.com> | 2013-07-08 22:01:58 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.com> | 2013-07-08 23:39:49 -0300 |
commit | c62137b8326c1190f297e6f3d4c04d23b9614c57 (patch) | |
tree | 47410fed32c4a9734ed900b81f877cdd8a3103f6 | |
parent | 9e313eb0a717a8d99c55d1a3d92b951a2d89a24b (diff) | |
download | gstreamer-plugins-bad-c62137b8326c1190f297e6f3d4c04d23b9614c57.tar.gz |
uridownloader: fix crash when download is null
Do no try to unref a NULL download attribute
-rw-r--r-- | gst-libs/gst/uridownloader/gsturidownloader.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst-libs/gst/uridownloader/gsturidownloader.c b/gst-libs/gst/uridownloader/gsturidownloader.c index f068630ec..28e0aff79 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; } |