summaryrefslogtreecommitdiff
path: root/gtk/gtktextbtree.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-09-07 22:32:02 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-09-07 22:32:02 +0000
commite8648181eddfc2e9069631fd5a7083fe015f3605 (patch)
tree05f6020ecca9ec232045acbf12fe6e342ee0ece5 /gtk/gtktextbtree.c
parent1bbf2ac7ee201ea1a6a1f6307371dae86952235b (diff)
downloadgdk-pixbuf-e8648181eddfc2e9069631fd5a7083fe015f3605.tar.gz
remove some debug code that seems to have caused a breakpoint in valid
2001-09-07 Havoc Pennington <hp@redhat.com> * gtk/gtktextlayout.c (gtk_text_layout_get_lines): remove some debug code that seems to have caused a breakpoint in valid cases * gtk/gtktextbtree.c (_gtk_text_btree_add_view): set the prev pointer on the first view when adding the second view, fixes crash when closing gtk-demo text test with active selection * gtk/gtktextbuffer.c (gtk_text_buffer_remove_selection_clipboard): don't leave dead clipboards in the list of clipboards - probably fixes #59836
Diffstat (limited to 'gtk/gtktextbtree.c')
-rw-r--r--gtk/gtktextbtree.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtktextbtree.c b/gtk/gtktextbtree.c
index 492bcae83..5a7fe85d2 100644
--- a/gtk/gtktextbtree.c
+++ b/gtk/gtktextbtree.c
@@ -1395,6 +1395,12 @@ _gtk_text_btree_add_view (GtkTextBTree *tree,
view->next = tree->views;
view->prev = NULL;
+ if (tree->views)
+ {
+ g_assert (tree->views->prev == NULL);
+ tree->views->prev = view;
+ }
+
tree->views = view;
/* The last line in the buffer has identity values for the per-view
@@ -1453,6 +1459,9 @@ _gtk_text_btree_remove_view (GtkTextBTree *tree,
gtk_text_btree_node_remove_view (view, tree->root_node, view_id);
+ view->layout = (gpointer) 0xdeadbeef;
+ view->view_id = (gpointer) 0xdeadbeef;
+
g_free (view);
}
@@ -3276,7 +3285,7 @@ _gtk_text_line_remove_data (GtkTextLine *line,
gpointer
_gtk_text_line_get_data (GtkTextLine *line,
- gpointer view_id)
+ gpointer view_id)
{
GtkTextLineData *iter;