From b5dff5e41701a1ad0521b820ef99e33fa2a6f9ff Mon Sep 17 00:00:00 2001 From: Juan Pablo Ugarte Date: Thu, 28 Nov 2013 16:56:11 -0300 Subject: [PATCH] GtkIconCache: find_image_offset() return 0 if icon_name is NULL. This avoid a crash calling gtk_about_dialog_set_logo_icon_name() with a NULL icon_name. --- gtk/gtkiconcache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkiconcache.c b/gtk/gtkiconcache.c index 09aaa1b44e..4eaff97b65 100644 --- a/gtk/gtkiconcache.c +++ b/gtk/gtkiconcache.c @@ -235,6 +235,9 @@ find_image_offset (GtkIconCache *cache, guint32 image_list_offset, n_images; int i; + if (!icon_name) + return 0; + chain_offset = cache->last_chain_offset; if (chain_offset) {