[anjuta] starter: Fix critical
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] starter: Fix critical
- Date: Fri, 18 Mar 2011 04:14:37 +0000 (UTC)
commit 7dd9eb7582589322c167ed584b71f3203cc0b843
Author: Johannes Schmid <jhs gnome org>
Date: Thu Mar 17 17:59:46 2011 -0400
starter: Fix critical
plugins/starter/plugin.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/plugins/starter/plugin.c b/plugins/starter/plugin.c
index caa2028..7dc1449 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]