[gtk+/gtk-3-22] TreeViewCol: Don’t try to disconnect null treeview
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] TreeViewCol: Don’t try to disconnect null treeview
- Date: Fri, 6 Oct 2017 23:47:48 +0000 (UTC)
commit 08187aeec5fdd94025054eb39c940f98a81100d5
Author: Daniel Boles <dboles src gnome org>
Date: Fri Oct 6 20:24:01 2017 +0100
TreeViewCol: Don’t try to disconnect null treeview
https://bugzilla.gnome.org/show_bug.cgi?id=788614
gtk/gtktreeviewcolumn.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 48b6fcd..f3cf869 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -1412,10 +1412,11 @@ _gtk_tree_view_column_unset_tree_view (GtkTreeViewColumn *column)
{
GtkTreeViewColumnPrivate *priv = column->priv;
- if (priv->tree_view)
- {
- gtk_container_remove (GTK_CONTAINER (priv->tree_view), priv->button);
- }
+ if (priv->tree_view == NULL)
+ return;
+
+ gtk_container_remove (GTK_CONTAINER (priv->tree_view), priv->button);
+
if (priv->property_changed_signal)
{
g_signal_handler_disconnect (priv->tree_view, priv->property_changed_signal);
@@ -1425,7 +1426,7 @@ _gtk_tree_view_column_unset_tree_view (GtkTreeViewColumn *column)
if (priv->sort_column_changed_signal)
{
g_signal_handler_disconnect (gtk_tree_view_get_model (GTK_TREE_VIEW (priv->tree_view)),
- priv->sort_column_changed_signal);
+ priv->sort_column_changed_signal);
priv->sort_column_changed_signal = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]