[Xfce4-commits] <thunar:master> Don't segfault when supported schemes returns NULL (bug #9224).

Nick Schermer noreply at xfce.org
Tue Sep 25 20:06:01 CEST 2012


Updating branch refs/heads/master
         to a34d540c346166768bce2caf13807a851fb2bfd9 (commit)
       from aa3e22ffa21d8f0f6836df51450c95d9e466fa0f (commit)

commit a34d540c346166768bce2caf13807a851fb2bfd9
Author: Lionel Le Folgoc <lionel at lefolgoc.net>
Date:   Tue Sep 25 20:03:01 2012 +0200

    Don't segfault when supported schemes returns NULL (bug #9224).
    
    Sometimes g_vfs_get_supported_uri_schemes() returns NULL, handle
    that properly.

 thunar/thunar-gio-extensions.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c
index 6200688..4e5c77f 100644
--- a/thunar/thunar-gio-extensions.c
+++ b/thunar/thunar-gio-extensions.c
@@ -249,6 +249,9 @@ thunar_g_vfs_is_uri_scheme_supported (const gchar *scheme)
   gvfs = g_vfs_get_default ();
   supported_schemes = g_vfs_get_supported_uri_schemes (gvfs);
 
+  if (supported_schemes == NULL)
+    return FALSE;
+
   for (n = 0; !supported && supported_schemes[n] != NULL; ++n) 
     if (g_strcmp0 (supported_schemes[n], scheme) == 0)
       supported = TRUE;


More information about the Xfce4-commits mailing list