From ee1cf432858603bf3d78eddb4207734e6939c2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 17 Apr 2008 07:29:28 +0000 Subject: [PATCH] ext/gio/gstgio.c: Return NULL instead of a gchar * array with one NULL element if we don't get any supported URI sche... Original commit message from CVS: * ext/gio/gstgio.c: (gst_gio_get_supported_protocols): Return NULL instead of a gchar * array with one NULL element if we don't get any supported URI schemes from GIO. --- ChangeLog | 6 ++++++ ext/gio/gstgio.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 140e47a2de..d210399d2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-17 Sebastian Dröge + + * ext/gio/gstgio.c: (gst_gio_get_supported_protocols): + Return NULL instead of a gchar * array with one NULL element if we + don't get any supported URI schemes from GIO. + 2008-04-15 Stefan Kost * gst/audiotestsrc/gstaudiotestsrc.c: diff --git a/ext/gio/gstgio.c b/ext/gio/gstgio.c index a0e08c6c06..9803d211ba 100644 --- a/ext/gio/gstgio.c +++ b/ext/gio/gstgio.c @@ -104,6 +104,11 @@ gst_gio_get_supported_protocols (void) schemes = g_vfs_get_supported_uri_schemes (g_vfs_get_default ()); num = g_strv_length ((gchar **) schemes); + if (num == 0) { + GST_WARNING ("No GIO supported URI schemes found"); + return NULL; + } + our_schemes = g_new0 (gchar *, num + 1); /* - Filter http/https as we can't support the icy stuff with GIO.