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.
This commit is contained in:
Matthias Clasen 2013-05-02 21:00:57 -04:00
parent a360b314aa
commit 9d69c274e0

View File

@ -72,7 +72,7 @@ g_emblemed_icon_finalize (GObject *object)
emblemed = G_EMBLEMED_ICON (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_list_free_full (emblemed->priv->emblems, g_object_unref);
(*G_OBJECT_CLASS (g_emblemed_icon_parent_class)->finalize) (object); (*G_OBJECT_CLASS (g_emblemed_icon_parent_class)->finalize) (object);