diff options
author | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2011-09-28 13:02:20 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2011-10-06 11:02:02 +0200 |
commit | f920ded54116f44c9f269d2e509d108a85e943b0 (patch) | |
tree | fdcd6e704cf8491b224f2bee6b3c485a02e3cdd7 /gtk/gtktreeviewcolumn.c | |
parent | 37f71d71cd51e93c5aa83f3334f6927b88bd65f6 (diff) | |
download | gtk+-f920ded54116f44c9f269d2e509d108a85e943b0.tar.gz |
GtkTreeViewColumn: dispose: Remove from the treeview
This handles the case (with gtkmm) that the GtkTreeViewColumn is
destroyed before the GtkTreeView is destroyed.
Bug #659672
Diffstat (limited to 'gtk/gtktreeviewcolumn.c')
-rw-r--r-- | gtk/gtktreeviewcolumn.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index b36588a95f..d081cd8590 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -517,6 +517,12 @@ gtk_tree_view_column_dispose (GObject *object) GtkTreeViewColumn *tree_column = (GtkTreeViewColumn *) object; GtkTreeViewColumnPrivate *priv = tree_column->priv; + /* Remove this column from its treeview, + * in case this column is destroyed before its treeview. + */ + if (priv->tree_view) + gtk_tree_view_remove_column (GTK_TREE_VIEW (priv->tree_view), tree_column); + if (priv->cell_area_context) { g_signal_handler_disconnect (priv->cell_area_context, |