uri: add guard to make sure gstreamer is initialized
authorTim-Philipp Müller <tim@centricular.com>
Tue, 2 Feb 2016 10:56:35 +0000 (10:56 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 2 Feb 2016 10:56:35 +0000 (10:56 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=761448

gst/gsturi.c

index 8623d44..4ad7d3d 100644 (file)
@@ -994,6 +994,9 @@ static GstUri *
 _gst_uri_new (void)
 {
   GstUri *uri;
+
+  g_return_val_if_fail (gst_is_initialized (), NULL);
+
   uri = GST_URI_CAST (g_slice_new0 (GstUri));
 
   if (uri)