summaryrefslogtreecommitdiff
path: root/gtk/gtktreeviewcolumn.c
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>2011-09-28 13:02:20 +0200
committerMurray Cumming <murrayc@murrayc.com>2011-10-06 11:02:02 +0200
commitf920ded54116f44c9f269d2e509d108a85e943b0 (patch)
treefdcd6e704cf8491b224f2bee6b3c485a02e3cdd7 /gtk/gtktreeviewcolumn.c
parent37f71d71cd51e93c5aa83f3334f6927b88bd65f6 (diff)
downloadgtk+-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.c6
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,