segfault in gtk_tree_item_remove_subtree()



When I construct a GtkTree, then remove the subtree, the whole thing comes
crashing down. This only happens when an item some place down in the subtree
was selected -- it apparently tries to redraw the focus on the removed item.

The problem is in gtk_tree_item_draw_lines(). This line:

	if (g_list_last (tree->children)->data != item)

(line 628 of gtktreeitem.c in gtk+ 1.2.3) is where it happens.
tree->children is NULL, so getting the data field out segfaults it...

The funny thing is, I'm doing a similar sort of operation in another part
of my program, and I'm not seeing the problem there at all.

I'm working around it for now by getting the selection list, and calling
gtk_tree_remove_items() on it first. Looks like a bug to me, though. Am I
doing something wrong?


Bert Vermeulen
bert@biot.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]