Bug in g_list_remove?
- From: Robin Ericsson <lobbin lobbin ml org>
- To: gtk-list redhat com
- Subject: Bug in g_list_remove?
- Date: Sun, 13 Sep 1998 23:22:57 +0200 (CEST)
I've found some problem with the g_list_remove(). When I call it on the first
object in the link, the ->next pointers got skrewie, and another call I made to
the ->data crashed my app. The version of GTK+ and Glib I'm running was
something I pulled from the CVS tree last week. When I go online to port this
letter I'll get the latest source to see if it has been fixed.
This is the fix I did in my source:
WIZARD_DATA *w;
GList *list1; /* this one is global, put it here to show you */
if ( w == list1->data )
{
GList *tmp;
tmp = list1->next;
tmp->prev = NULL;
g_list_free_1 (list1);
list1 = tmp;
}
else
g_list_remove (list1, w);
It was when I called g_list_remove (list1, w); all the time it went screwie.
---
''~``
( o o )
+-[Web - http://lobbin.ml.org/-------.oooO--(_)--Oooo.-------------+
| Robin Ericsson - System Administrator - HTML/PERL/C Hacker |
| Implementor of the mud The Shadow Rising - Soon to be open |
+-[eMail - lobbin@lobbin.ml.org]-----------------------------------+
-- How about a fortune?
No man would listen to you talk if he didn't know it was his turn next.
-- E.W. Howe
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]