diff options
author | Daniel Boles <dboles@src.gnome.org> | 2017-10-06 20:24:01 +0100 |
---|---|---|
committer | Daniel Boles <dboles@src.gnome.org> | 2017-10-06 21:34:52 +0100 |
commit | 08187aeec5fdd94025054eb39c940f98a81100d5 (patch) | |
tree | be11442b1eb99f1c06ff387660fb53d74a70f2eb /gtk/gtktreeviewcolumn.c | |
parent | 7997a722a185175ee6c6d5f3f13c34d8a3a7c7f6 (diff) | |
download | gtk+-08187aeec5fdd94025054eb39c940f98a81100d5.tar.gz |
TreeViewCol: Don’t try to disconnect null treeview
https://bugzilla.gnome.org/show_bug.cgi?id=788614
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r-- | gtk/gtktreeviewcolumn.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 48b6fcd7c7..f3cf8691a1 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; } |