[gnome-packagekit] Do not emit a critical warning when we reset the icon to NULL
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-packagekit] Do not emit a critical warning when we reset the icon to NULL
- Date: Sun, 1 Aug 2010 12:53:35 +0000 (UTC)
commit e46c56babea1d2625f837bac5a82337baa7d6848
Author: Richard Hughes <richard hughsie com>
Date: Sat Jul 31 10:02:38 2010 +0200
Do not emit a critical warning when we reset the icon to NULL
src/gpk-check-update.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/gpk-check-update.c b/src/gpk-check-update.c
index ca8ba97..79f4b9d 100644
--- a/src/gpk-check-update.c
+++ b/src/gpk-check-update.c
@@ -142,9 +142,12 @@ out:
static void
gpk_check_update_set_gicon (GpkCheckUpdate *cupdate, GIcon *gicon)
{
- if (cupdate->priv->gicon != NULL)
+ if (cupdate->priv->gicon != NULL) {
g_object_unref (cupdate->priv->gicon);
- cupdate->priv->gicon = g_object_ref (gicon);
+ cupdate->priv->gicon = NULL;
+ }
+ if (gicon != NULL)
+ cupdate->priv->gicon = g_object_ref (gicon);
gpk_check_update_set_icon_visibility (cupdate);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]