[glib] Silently handle icon being NULL
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Silently handle icon being NULL
- Date: Fri, 3 May 2013 01:01:59 +0000 (UTC)
commit 9d69c274e0e13294bbfd6488c220ab523d3e881a
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 2 21:00:57 2013 -0400
Silently handle icon being NULL
While an emblemed icon without a base icon is not very
useful, no need to crash here.
This was crashing the object finalization test in gtk.
gio/gemblemedicon.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gemblemedicon.c b/gio/gemblemedicon.c
index 32e7341..6f977fd 100644
--- a/gio/gemblemedicon.c
+++ b/gio/gemblemedicon.c
@@ -72,7 +72,7 @@ g_emblemed_icon_finalize (GObject *object)
emblemed = G_EMBLEMED_ICON (object);
- g_object_unref (emblemed->priv->icon);
+ g_clear_object (&emblemed->priv->icon);
g_list_free_full (emblemed->priv->emblems, g_object_unref);
(*G_OBJECT_CLASS (g_emblemed_icon_parent_class)->finalize) (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]