[gnome-builder] GbDevhelpDocument: don't unref resulting DhLink from tree model
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] GbDevhelpDocument: don't unref resulting DhLink from tree model
- Date: Thu, 11 Dec 2014 00:13:57 +0000 (UTC)
commit f2329e311cdb0c98f80b6f693e236cf1da78ca34
Author: Christian Hergert <christian hergert me>
Date: Tue Dec 9 18:26:02 2014 -0800
GbDevhelpDocument: don't unref resulting DhLink from tree model
The DhLink was not specified (perhaps improperly) as a boxed type. Therefore
no reference was incurred during gtk_tree_model_get(). So there is no
need for us to unref the structure.
src/devhelp/gb-devhelp-document.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/devhelp/gb-devhelp-document.c b/src/devhelp/gb-devhelp-document.c
index 992edb9..7aa9cd1 100644
--- a/src/devhelp/gb-devhelp-document.c
+++ b/src/devhelp/gb-devhelp-document.c
@@ -114,6 +114,13 @@ gb_devhelp_document_set_search (GbDevhelpDocument *document,
DhLink *link = NULL;
gchar *name = NULL;
+ /*
+ * NOTE:
+ *
+ * Note that the DH_KEYWORD_MODEL_COL_LINK is specified as a
+ * G_TYPE_POINTER so dh_link_unref() does not need to be called
+ * on the resulting structure.
+ */
gtk_tree_model_get (GTK_TREE_MODEL (priv->model), &iter,
DH_KEYWORD_MODEL_COL_NAME, &name,
DH_KEYWORD_MODEL_COL_LINK, &link,
@@ -127,7 +134,6 @@ gb_devhelp_document_set_search (GbDevhelpDocument *document,
}
g_clear_pointer (&name, g_free);
- g_clear_pointer (&link, dh_link_unref);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]