From da9682a593723db926ab5e0c083bdc8f1c17e17f Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 24 Oct 2010 15:38:30 +0200 Subject: [PATCH] discoverer: Don't ref a NULL caps https://bugzilla.gnome.org/show_bug.cgi?id=632988 --- gst-libs/gst/pbutils/gstdiscoverer-types.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/pbutils/gstdiscoverer-types.c b/gst-libs/gst/pbutils/gstdiscoverer-types.c index b4c51c3..b7c978c 100644 --- a/gst-libs/gst/pbutils/gstdiscoverer-types.c +++ b/gst-libs/gst/pbutils/gstdiscoverer-types.c @@ -539,7 +539,9 @@ gst_discoverer_stream_info_get_caps (GstDiscovererStreamInfo * info) { g_return_val_if_fail (GST_IS_DISCOVERER_STREAM_INFO (info), NULL); - return gst_caps_ref (info->caps); + if (info->caps) + return gst_caps_ref (info->caps); + return NULL; } /** -- 2.7.4