[glib] Make GFileIcon more robust
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Make GFileIcon more robust
- Date: Wed, 1 Jan 2014 23:01:02 +0000 (UTC)
commit 3a37e403e6813305fe0b3dd57b0db1a1eb30a627
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 23 15:00:55 2013 -0500
Make GFileIcon more robust
No reason not to survive g_object_unref (g_object_new (...))
gio/gfileicon.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]