From 3a37e403e6813305fe0b3dd57b0db1a1eb30a627 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 23 Dec 2013 15:00:55 -0500 Subject: [PATCH 1/1] Make GFileIcon more robust No reason not to survive g_object_unref (g_object_new (...)) --- gio/gfileicon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gio/gfileicon.c b/gio/gfileicon.c index 0778107..b40ef00 100644 --- a/gio/gfileicon.c +++ b/gio/gfileicon.c @@ -120,7 +120,8 @@ g_file_icon_finalize (GObject *object) icon = G_FILE_ICON (object); - g_object_unref (icon->file); + if (icon->file) + g_object_unref (icon->file); G_OBJECT_CLASS (g_file_icon_parent_class)->finalize (object); } -- 2.7.4