[glib/glib-2-22] Avoid a warning
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glib/glib-2-22] Avoid a warning
- Date: Sun, 25 Oct 2009 06:56:29 +0000 (UTC)
commit d8fc1528b74cd79f59b9c630c5f6b170e0b65818
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Oct 25 02:50:12 2009 -0400
Avoid a warning
gio/gfile.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gio/gfile.c b/gio/gfile.c
index 54a41c0..c4a72e3 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]