aboutsummaryrefslogtreecommitdiff
path: root/src/idousermenuitem.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-06-23 18:37:38 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-06-23 18:37:38 -0500
commit1f0bfc0aab8b824134da5a8402a9422f0ad34464 (patch)
tree9ab99a49272c88d0c2c9ac1b6bf3fd5613049dc9 /src/idousermenuitem.c
parent8008ec3c0dbd2dca7697f4f22c90f1d84819d1e0 (diff)
downloadayatana-ido-1f0bfc0aab8b824134da5a8402a9422f0ad34464.tar.gz
ayatana-ido-1f0bfc0aab8b824134da5a8402a9422f0ad34464.tar.bz2
ayatana-ido-1f0bfc0aab8b824134da5a8402a9422f0ad34464.zip
silence console warnings when a NULL filename is passed into ido_user_menu_item_set_icon_from_filename()
Diffstat (limited to 'src/idousermenuitem.c')
-rw-r--r--src/idousermenuitem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/idousermenuitem.c b/src/idousermenuitem.c
index ab95d66..e6ba710 100644
--- a/src/idousermenuitem.c
+++ b/src/idousermenuitem.c
@@ -308,8 +308,8 @@ ido_user_menu_item_set_icon (IdoUserMenuItem * self, GIcon * icon)
void
ido_user_menu_item_set_icon_from_file (IdoUserMenuItem * self, const char * filename)
{
- GFile * file = g_file_new_for_path (filename);
- GIcon * icon = g_file_icon_new (file);
+ GFile * file = filename ? g_file_new_for_path (filename) : NULL;
+ GIcon * icon = file ? g_file_icon_new (file) : NULL;
ido_user_menu_item_set_icon (self, icon);