Re: Some bugs in Gtk+ 1.3.1



Salmaso Raffaele <r salmaso inwind it> writes:

> Il 01 Oct 2000 22:15:08 -0400, otaylor fresnel labs redhat com
> scrisse:
> 
> >I haven't seen this myself - what's the exact sequence of
> >actions you do to trigger this error?
> Start testgtk, and select entry example: click on close it should
> seg-fault.

Ah yes, this does crash for me too. As it turned out, it
was one of the classic list manipulation bugs.

Thanks for pointing it out.
                                        Owen 

Index: gdkselection-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkselection-x11.c,v
retrieving revision 1.14
diff -u -r1.14 gdkselection-x11.c
--- gdkselection-x11.c	2000/09/14 16:41:20	1.14
+++ gdkselection-x11.c	2000/10/04 19:51:36
@@ -56,12 +56,13 @@
   while (tmp_list)
     {
       OwnerInfo *info = tmp_list->data;
+      tmp_list = tmp_list->next;
+      
       if (info->owner == window)
 	{
 	  owner_list = g_slist_remove (owner_list, info);
 	  g_free (info);
 	}
-      tmp_list = tmp_list->next;
     }
 }
 




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