Commit 16a0782c authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Don't crash when finalizing an unused GtkTextChildAnchor. (#132260,

Sat Jan 31 23:13:43 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextchild.c (gtk_text_child_anchor_finalize): Don't
	crash when finalizing an unused GtkTextChildAnchor.  (#132260,
	muppet)
parent 27d4a376
Sat Jan 31 23:13:43 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextchild.c (gtk_text_child_anchor_finalize): Don't
crash when finalizing an unused GtkTextChildAnchor. (#132260,
muppet)
Sat Jan 31 22:41:57 2004 Matthias Clasen <maclas@gmx.de> Sat Jan 31 22:41:57 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Correct * gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Correct
......
Sat Jan 31 23:13:43 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextchild.c (gtk_text_child_anchor_finalize): Don't
crash when finalizing an unused GtkTextChildAnchor. (#132260,
muppet)
Sat Jan 31 22:41:57 2004 Matthias Clasen <maclas@gmx.de> Sat Jan 31 22:41:57 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Correct * gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Correct
......
Sat Jan 31 23:13:43 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextchild.c (gtk_text_child_anchor_finalize): Don't
crash when finalizing an unused GtkTextChildAnchor. (#132260,
muppet)
Sat Jan 31 22:41:57 2004 Matthias Clasen <maclas@gmx.de> Sat Jan 31 22:41:57 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Correct * gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Correct
......
Sat Jan 31 23:13:43 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextchild.c (gtk_text_child_anchor_finalize): Don't
crash when finalizing an unused GtkTextChildAnchor. (#132260,
muppet)
Sat Jan 31 22:41:57 2004 Matthias Clasen <maclas@gmx.de> Sat Jan 31 22:41:57 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Correct * gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Correct
......
Sat Jan 31 23:13:43 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextchild.c (gtk_text_child_anchor_finalize): Don't
crash when finalizing an unused GtkTextChildAnchor. (#132260,
muppet)
Sat Jan 31 22:41:57 2004 Matthias Clasen <maclas@gmx.de> Sat Jan 31 22:41:57 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Correct * gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Correct
......
...@@ -377,24 +377,27 @@ gtk_text_child_anchor_finalize (GObject *obj) ...@@ -377,24 +377,27 @@ gtk_text_child_anchor_finalize (GObject *obj)
seg = anchor->segment; seg = anchor->segment;
if (seg->body.child.tree != NULL) if (seg)
{ {
g_warning ("Someone removed a reference to a GtkTextChildAnchor " if (seg->body.child.tree != NULL)
"they didn't own; the anchor is still in the text buffer " {
"and the refcount is 0."); g_warning ("Someone removed a reference to a GtkTextChildAnchor "
return; "they didn't own; the anchor is still in the text buffer "
} "and the refcount is 0.");
return;
}
tmp_list = seg->body.child.widgets; tmp_list = seg->body.child.widgets;
while (tmp_list) while (tmp_list)
{ {
g_object_unref (tmp_list->data); g_object_unref (tmp_list->data);
tmp_list = g_slist_next (tmp_list); tmp_list = g_slist_next (tmp_list);
} }
g_slist_free (seg->body.child.widgets); g_slist_free (seg->body.child.widgets);
g_free (seg); g_free (seg);
}
anchor->segment = NULL; anchor->segment = NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment