Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_misc.c
Log Message:
Fix segv caused by list access recursion.
Set freed lists to NULL to more easily detect late references.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_misc.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_misc.c 26 May 2005 23:02:24 -0000 1.8
+++ ewl_misc.c 27 May 2005 04:48:12 -0000 1.9
@@ -173,7 +173,6 @@
}
ewl_embed_list = ecore_list_new();
- ecore_list_set_free_cb(ewl_embed_list, ewl_widget_destroy);
ewl_window_list = ecore_list_new();
ecore_idle_enterer_add(ewl_idle_render, NULL);
@@ -196,9 +195,15 @@
/*
* Destroy all existing widgets.
*/
- if (ewl_embed_list)
+ if (ewl_embed_list) {
+ Ewl_Widget *emb;
+
+ while ((emb = ecore_list_remove_first(ewl_embed_list)))
+ ewl_widget_destroy(emb);
+ ewl_garbage_collect();
ecore_list_destroy(ewl_embed_list);
- ewl_garbage_collect();
+ ewl_embed_list = NULL;
+ }
/*
* Shut down the various EWL subsystems cleanly.
@@ -210,14 +215,22 @@
/*
* Free internal accounting lists.
*/
- if (ewl_window_list)
+ if (ewl_window_list) {
ecore_list_destroy(ewl_window_list);
+ ewl_window_list = NULL;
+ }
ecore_list_destroy(configure_list);
+ configure_list = NULL;
ecore_list_destroy(realize_list);
+ realize_list = NULL;
ecore_list_destroy(destroy_list);
+ destroy_list = NULL;
ecore_list_destroy(free_evas_list);
+ free_evas_list = NULL;
ecore_list_destroy(free_evas_object_list);
+ free_evas_object_list = NULL;
ecore_list_destroy(child_add_list);
+ child_add_list = NULL;
edje_shutdown();
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs