Re: testgtk crashes in bsearch



"Padraig O'Briain" <Padraig Obriain Sun COM> writes:

> When running testtreeview I got the message
> 
> testtreeview (pid:5486): GRuntime-CRITICAL **: file gparam.c: line 166 
> (g_param_spec_ref): assertion `G_IS_PARAM_SPEC (pspec)' failed
> 
> Making the change below got rid of it. May I commit?

Yes, go ahead. (With a space after the two lines and a ChangeLog entry :-)

Regards,
                                        Owen
 
> Padraig
> 
> Index: gtkstyle.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtkstyle.c,v
> retrieving revision 1.77
> diff -u -p -r1.77 gtkstyle.c
> --- gtkstyle.c  2001/09/10 10:54:43     1.77
> +++ gtkstyle.c  2001/09/10 12:10:34
> @@ -1300,13 +1300,13 @@ _gtk_style_peek_property_value (GtkStyle
>    g_return_val_if_fail (g_type_is_a (pspec->owner_type, GTK_TYPE_WIDGET), 
> NULL);
>    g_return_val_if_fail (g_type_is_a (widget_type, pspec->owner_type), NULL);
>  
> +  key.widget_type = widget_type;
> +  key.pspec = pspec;
>    /* need value cache array */
>    if (!style->property_cache)
>      style->property_cache = g_array_new (FALSE, FALSE, sizeof (PropertyValue));
>    else
>      {
> -      key.widget_type = widget_type;
> -      key.pspec = pspec;
>        pcache = bsearch (&key,
>                         style->property_cache->data, style->property_cache->len,
>                         sizeof (PropertyValue), style_property_values_cmp);




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