Re: [gtk-list] g_list_remove_link bug



>  In function
>  
>  GList*
>  g_list_remove_link (GList *list,
>                      GList *link)
>  
>  link is removed from the list. If link and list are identical, then
>  list=list->next. This is good most of the time, but when list (and link)
>  is the last element of the list, this results in list=NULL. 

You are using this function incorrectly.  "list" has to be the head of
the list, not any random node in the middle.  And it has to be called
like this:

	my_list = g_list_remove_link (my_list, my_node);

  Federico



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