st-icon: check if gicon is null before unref.

Commit a6b49fe7d6
introduced a check for equality of priv->gicon vs gicon
and unref then return early if so. But if both are null,
we should not unref gicon. Only return.

https://bugzilla.gnome.org/show_bug.cgi?id=698863
This commit is contained in:
Alban Browaeys 2013-04-25 18:25:12 +02:00 committed by Adel Gadllah
parent ed63bda932
commit e96d9e0ea1

View File

@ -544,6 +544,7 @@ st_icon_set_icon_name (StIcon *icon,
if (g_icon_equal (priv->gicon, gicon)) /* do nothing */
{
if (gicon)
g_object_unref (gicon);
return;
}