Hello Aarem,
On Thu, Jun 22, 2006 at 05:00:50PM -0500, Aar Em wrote:
> Glist *headers;
> .....
> headers = g_list_insert_sorted (headers, m,compare_ctime);
Do you initialize headers with NULL? If not, this could be the reason.
Otherwise, use gdb to see where it crashes.
> typedef struct _message_info
> {
> char *from;
> char *subject;
> char *face;
> long *ctime;
> } MESSAGE_INFO;
...
> static gint compare_ctime (gconstpointer a, gconstpointer b)
> {
> const MESSAGE_INFO *p1=a,*p2=b;
>
> return ((p1->ctime > p2->ctime) ? +1: (p1->ctime == p2->ctime) ? 0 : -1);
> }
I don't know what long *ctime is, but sorting by pointer value looks
suspicious. This shouldn't segfault, but I'm not sure it does what you
want.
With kind regards,
Baurzhan.
_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list