diff --git a/gst/gstquery.c b/gst/gstquery.c index f15708a4b6..3b9eddc834 100644 --- a/gst/gstquery.c +++ b/gst/gstquery.c @@ -1461,7 +1461,11 @@ gst_query_parse_uri_redirection (GstQuery * query, gchar ** uri) g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_URI); structure = GST_QUERY_STRUCTURE (query); - gst_structure_id_get (structure, GST_QUARK (URI_REDIRECTION), uri, NULL); + if (uri) { + if (!gst_structure_id_get (structure, GST_QUARK (URI_REDIRECTION), + G_TYPE_STRING, uri, NULL)) + *uri = NULL; + } } /**