diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2006-11-22 09:12:49 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@src.gnome.org> | 2006-11-22 09:12:49 +0000 |
commit | bf68a296f84fe053be3320b9f2fa3e75ee9d4398 (patch) | |
tree | adc01c54010fe6a51c00d222b7effbc7f14f11a6 /gtk/gtkrecentmanager.c | |
parent | 6b9ba0b65446839f605238f2079f2c85e794d849 (diff) | |
download | gtk+-bf68a296f84fe053be3320b9f2fa3e75ee9d4398.tar.gz |
g_filename_from_uri() might fail; catch the failure and fall back to the
2006-11-21 Emmanuele Bassi <ebassi@gnome.org>
* gtk/gtkrecentmanager.c:
(get_uri_shortname_for_display): g_filename_from_uri() might
fail; catch the failure and fall back to the non-local URI
case. (#363437)
Diffstat (limited to 'gtk/gtkrecentmanager.c')
-rw-r--r-- | gtk/gtkrecentmanager.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c index 68ac0de538..d99aefd38b 100644 --- a/gtk/gtkrecentmanager.c +++ b/gtk/gtkrecentmanager.c @@ -2225,7 +2225,7 @@ get_uri_shortname_for_display (const gchar *uri) local_file = g_filename_from_uri (uri, NULL, NULL); - if (local_file != NULL) + if (local_file) { name = g_filename_display_basename (local_file); validated = TRUE; @@ -2233,7 +2233,8 @@ get_uri_shortname_for_display (const gchar *uri) g_free (local_file); } - else + + if (!name) { gchar *method; gchar *local_file; |