diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-11-28 18:31:35 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2012-11-28 18:31:35 +0000 |
commit | aded707997d09c33b7e3566edb236a1ac849e051 (patch) | |
tree | a142389ff299b35a397843ea66ac6deb1b81cd67 | |
parent | 5173c9382c31800010736052760089cb694d1319 (diff) | |
parent | 1f58319a4448a2c4bab61f5d1612ee46e194c12b (diff) | |
download | libdbusmenu-aded707997d09c33b7e3566edb236a1ac849e051.tar.gz libdbusmenu-aded707997d09c33b7e3566edb236a1ac849e051.tar.bz2 libdbusmenu-aded707997d09c33b7e3566edb236a1ac849e051.zip |
Confirm that icon_name is non-NULL before passing it to gtk_icon_theme_has_icon(). Fixes: https://bugs.launchpad.net/bugs/1082516.
Approved by Mathieu Trudel-Lapierre, PS Jenkins bot.
-rw-r--r-- | libdbusmenu-gtk/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/client.c b/libdbusmenu-gtk/client.c index c33aaf3..8e84e3d 100644 --- a/libdbusmenu-gtk/client.c +++ b/libdbusmenu-gtk/client.c @@ -1182,7 +1182,7 @@ image_property_handle (DbusmenuMenuitem * item, const gchar * property, GVariant if (gtkimage != NULL && (gtk_image_get_storage_type(GTK_IMAGE(gtkimage)) == GTK_IMAGE_ICON_NAME || gtk_image_get_storage_type(GTK_IMAGE(gtkimage)) == GTK_IMAGE_EMPTY)) { const gchar *icon_name = NULL; gtk_image_get_icon_name (GTK_IMAGE(gtkimage), &icon_name, NULL); - if (gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), icon_name)) { + if ((icon_name != NULL) && gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), icon_name)) { return; } } |