aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/lib/elm_win.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-09-26 10:09:15 +0100
committerTom Hacohen <tom@stosb.com>2014-09-26 10:10:51 +0100
commit0ee7f4951b00ef5b6eef31ae09035a39a393f43a (patch)
treef4f26d6a115c1a3bb857bac39a4e56ed62a607f5 /legacy/elementary/src/lib/elm_win.c
parentscale: fix the floating number comparison. (diff)
downloadefl-0ee7f4951b00ef5b6eef31ae09035a39a393f43a.tar.gz
Elm win: fix wrong deletion of elm windows.
This is a fix upon 6e7686c030fab162edb3128de005ec00ea8c0ffc. This correctly deletes the list even if the windows are still referenced and even if they are deleted from under out feets.
Diffstat (limited to 'legacy/elementary/src/lib/elm_win.c')
-rw-r--r--legacy/elementary/src/lib/elm_win.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/legacy/elementary/src/lib/elm_win.c b/legacy/elementary/src/lib/elm_win.c
index 1e6b9985ed..ed6a2e71f5 100644
--- a/legacy/elementary/src/lib/elm_win.c
+++ b/legacy/elementary/src/lib/elm_win.c
@@ -2105,10 +2105,15 @@ _elm_win_on_resize_obj_changed_size_hints(void *data,
void
_elm_win_shutdown(void)
{
- Eina_List *itr, *itrn;
- Evas_Object *obj;
- EINA_LIST_FOREACH_SAFE(_elm_win_list, itr, itrn, obj)
- evas_object_del(obj);
+ while (_elm_win_list)
+ {
+ Eina_List *itr = _elm_win_list;
+ evas_object_del(itr->data);
+ if (_elm_win_list == itr)
+ {
+ _elm_win_list = eina_list_remove_list(_elm_win_list, _elm_win_list);
+ }
+ }
ELM_SAFE_FREE(_elm_win_state_eval_job, ecore_job_del);
}