gio: handle g_vfs_get_supported_uri_schemes() returning NULL

Handle g_vfs_get_supported_uri_schemes() returning NULL more
gracefully, without criticals for passing NULL to g_strv_length().
This commit is contained in:
Tim-Philipp Müller 2012-10-29 13:31:28 +00:00
parent 5f45069624
commit 8abc646ecb

View file

@ -102,7 +102,11 @@ _internal_get_supported_protocols (gpointer data)
gint i, j;
schemes = g_vfs_get_supported_uri_schemes (g_vfs_get_default ());
num = g_strv_length ((gchar **) schemes);
if (schemes != NULL)
num = g_strv_length ((gchar **) schemes);
else
num = 0;
if (num == 0) {
GST_WARNING ("No GIO supported URI schemes found");