From f3fbf37dd899de5d7bd61d86bed8aada479f564a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 25 Oct 2009 02:56:13 -0400 Subject: [PATCH] Avoid a warning --- gio/gfile.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gio/gfile.c b/gio/gfile.c index 54a41c01..c4a72e35 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -5956,11 +5956,14 @@ g_file_query_default_handler (GFile *file, char *path; uri_scheme = g_file_get_uri_scheme (file); - appinfo = g_app_info_get_default_for_uri_scheme (uri_scheme); - g_free (uri_scheme); + if (uri_scheme) + { + appinfo = g_app_info_get_default_for_uri_scheme (uri_scheme); + g_free (uri_scheme); - if (appinfo != NULL) - return appinfo; + if (appinfo != NULL) + return appinfo; + } info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, -- 2.34.1