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

gEDA-user: CVS gschem crash in recent_files_add



recent_files_add starts at global_window_current and walks back through
'prev' as far as it can.  In my crash, global_window_current looks fine,
its 'prev' looks fine (like a suitable pointer) but the contents of THAT
are garbage, which causes a crash in a GTK sanity check.

This seems to be due to s_toplevel_init() creating exactly that:  A
toplevel with the only initialized fields being wid, next, prev.

I don't really know what was intended, but I see a few solutions:

1)  Have recent_files_add ignore wid==-1 toplevels, or

2)  If people are doing this everywhere, just change s_toplevel_init
to call g_new0().

I just tested (1), I will probably throw in (2) just to be safe.

-- 
Ben Jackson AD7GD
<ben@xxxxxxx>
http://www.ben.com/


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user