summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-05-02 21:00:57 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-05-02 21:02:37 -0400
commit9d69c274e0e13294bbfd6488c220ab523d3e881a (patch)
treec020c3d18982c7791325ed6b327d2f2530e6ae15
parenta360b314aad5dcbc575948a401d22d47a36e4328 (diff)
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.
-rw-r--r--gio/gemblemedicon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gio/gemblemedicon.c b/gio/gemblemedicon.c
index 32e734104..6f977fd4c 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);