[gtk+] treeviewcolumn: use g_clear_object when freeing cursor
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] treeviewcolumn: use g_clear_object when freeing cursor
- Date: Tue, 27 Sep 2016 19:43:30 +0000 (UTC)
commit 3c775eb2b808c6f7b1b7a6eab5fefe1085d74c5a
Author: Christian Hergert <chergert redhat com>
Date: Tue Sep 27 12:41:55 2016 -0700
treeviewcolumn: use g_clear_object when freeing cursor
There is the chance that the cursor returned NULL on systems
with missing cursors. This defensively handles that by checking
for a NULL cursor.
gtk/gtktreeviewcolumn.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 055d938..48b6fcd 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -1349,7 +1349,7 @@ _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column)
gtk_tree_view_column_update_button (column);
- g_object_unref (attr.cursor);
+ g_clear_object (&attr.cursor);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]