[gnome-shell/gnome-3-8] st-icon: check if gicon is null before unref.
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-8] st-icon: check if gicon is null before unref.
- Date: Wed, 31 Jul 2013 01:17:46 +0000 (UTC)
commit 61b1679719fb59206a1f055037cff586072f63f8
Author: Alban Browaeys <prahal yahoo com>
Date: Thu Apr 25 18:25:12 2013 +0200
st-icon: check if gicon is null before unref.
Commit a6b49fe7d6c9bcd8a2be47a0b0b44cf9a53a45aa
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
src/st/st-icon.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/st/st-icon.c b/src/st/st-icon.c
index 9d52727..fac474a 100644
--- a/src/st/st-icon.c
+++ b/src/st/st-icon.c
@@ -539,7 +539,8 @@ st_icon_set_icon_name (StIcon *icon,
if (g_icon_equal (priv->gicon, gicon)) /* do nothing */
{
- g_object_unref (gicon);
+ if (gicon)
+ g_object_unref (gicon);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]