From 7dd9eb7582589322c167ed584b71f3203cc0b843 Mon Sep 17 00:00:00 2001 From: Johannes Schmid Date: Thu, 17 Mar 2011 17:59:46 -0400 Subject: [PATCH] starter: Fix critical --- plugins/starter/plugin.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/starter/plugin.c b/plugins/starter/plugin.c index caa2028ed..7dc14498b 100644 --- a/plugins/starter/plugin.c +++ b/plugins/starter/plugin.c @@ -131,15 +131,17 @@ build_recent_projects (GtkWidget *box, StarterPlugin* plugin) G_FILE_ATTRIBUTE_STANDARD_ICON, G_FILE_QUERY_INFO_NONE, NULL, NULL); - icon = g_file_info_get_icon (info); - if (icon) + if (info) { - GtkWidget* image = gtk_image_new_from_gicon (icon, - GTK_ICON_SIZE_BUTTON); - gtk_box_pack_start (GTK_BOX (button_box), image, FALSE, FALSE, 0); + icon = g_file_info_get_icon (info); + if (icon) + { + GtkWidget* image = gtk_image_new_from_gicon (icon, + GTK_ICON_SIZE_BUTTON); + gtk_box_pack_start (GTK_BOX (button_box), image, FALSE, FALSE, 0); + } + g_object_unref (info); } - g_object_unref (info); - gtk_container_add (GTK_CONTAINER (button), button_box); gtk_widget_show_all (button); -- 2.11.4.GIT