[gnome-software] Avoid a critical on shutdown
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Avoid a critical on shutdown
- Date: Thu, 29 Aug 2013 23:03:41 +0000 (UTC)
commit 84158baa1374bae294ca3ab27321f29add15f735
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Aug 29 19:01:30 2013 -0400
Avoid a critical on shutdown
The category may not be set if we've never switched to the category
page.
src/gs-shell-category.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-shell-category.c b/src/gs-shell-category.c
index a85f764..feaead4 100644
--- a/src/gs-shell-category.c
+++ b/src/gs-shell-category.c
@@ -266,7 +266,8 @@ gs_shell_category_finalize (GObject *object)
GsShellCategoryPrivate *priv = shell->priv;
g_object_unref (priv->builder);
- g_object_unref (priv->category);
+ if (priv->category)
+ g_object_unref (priv->category);
G_OBJECT_CLASS (gs_shell_category_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]