From 1f2b95ae4f6abc6a5fc4f87d820c054b79b0e32c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 30 May 2017 10:41:05 -0400 Subject: [PATCH] use FOREACH_SAFE when walking client list during logout internal clients can be instantly destroyed and removed from the list --- src/bin/e_sys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/e_sys.c b/src/bin/e_sys.c index c09191a95..c75ce1653 100644 --- a/src/bin/e_sys.c +++ b/src/bin/e_sys.c @@ -745,14 +745,14 @@ _e_sys_logout_after(void) static void _e_sys_logout_begin(E_Sys_Action a_after, Eina_Bool raw) { - const Eina_List *l; + const Eina_List *l, *ll; E_Client *ec; stopping = 1; /* start logout - at end do the a_after action */ _e_sys_action_after = a_after; _e_sys_action_after_raw = raw; - EINA_LIST_FOREACH(e_comp->clients, l, ec) + EINA_LIST_FOREACH_SAFE(e_comp->clients, l, ll, ec) { e_client_act_close_begin(ec); }