Re: Some small bugs



Alexander Larsson <alla lysator liu se> writes:

> Apparently pixmap_node->mask_plus/minus are NULL here, giving a CRITICAL
> warning:
> 
> Index: gtk/gtktreeitem.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtktreeitem.c,v
> retrieving revision 1.44
> diff -u -p -r1.44 gtktreeitem.c
> --- gtk/gtktreeitem.c	2001/01/31 03:51:13	1.44
> +++ gtk/gtktreeitem.c	2001/02/20 13:28:16
> @@ -451,9 +451,11 @@ gtk_tree_item_remove_pixmaps (GtkTreeIte
>  	{
>  	  gdk_colormap_unref (pixmap_node->colormap);
>  	  gdk_pixmap_unref (pixmap_node->pixmap_plus);
> -	  gdk_bitmap_unref (pixmap_node->mask_plus);
> +	  if (pixmap_node->mask_plus)
> +	    gdk_bitmap_unref (pixmap_node->mask_plus);
>  	  gdk_pixmap_unref (pixmap_node->pixmap_minus);
> -	  gdk_bitmap_unref (pixmap_node->mask_minus);
> +	  if (pixmap_node->mask_minus)
> +	    gdk_bitmap_unref (pixmap_node->mask_minus);
>  	  
>  	  pixmaps = g_list_remove_link (pixmaps, tree_item->pixmaps);
>  	  g_list_free_1 (tree_item->pixmaps);
> 
> Can i check this in?

I think this isn't the correct fix - I believe that the problem is
that there has been a incompatible change in gdk_pixmap_new_from_xpm_d() 
[ and friends ]; before, a no-transparency XMP gave a solid mask,
now it gives a NULL mask.

So, I think we need to fix that instead, since it will break a LOT
of app programs as well.

It should be pretty easy - something like:

 if (mask && !*mask) 
   [ Create solid mask ]

Regards,
                                        Owen





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