Re: GtkClist crashing when elements = 0;
- From: Andy Kahn <ackahn netapp com>
- To: Chema Celorio <chema celorio com>
- Cc: gtk-list gnome org
- Subject: Re: GtkClist crashing when elements = 0;
- Date: Fri, 30 Jun 2000 00:33:45 -0700
On Fri, Jun 30, 2000 at 02:02:26AM -0500, Chema Celorio wrote:
> GtkClist is crashing on me when it doesn't have any elements.
> Is this a know problem ? Or am I missing something ?
Yes, you might be missing something:
> gchar *name_array[1];
...
> name_array[0] = g_strdup(name);
> gtk_clist_remove (GTK_CLIST (available_list), 0);
>
> new_row = gtk_clist_append (GTK_CLIST (installed_list), name_array);
The array of items appended to a clist needs to be NULL terminated.
Also, I believe you need to free the memory allocated from the
g_strdup(), since the clist automatically copies the text being
appended.
regards,
--andy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]