From: discomfitor Date: Wed, 1 Dec 2010 10:31:20 +0000 (+0000) Subject: avoid segv X-Git-Tag: build/2012-07-04.173327~1449 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b8a5ac9e73fe7803f779eb0f3204a9cd1074779;p=profile%2Fivi%2Fecore.git avoid segv git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@55117 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 28ef59c..d6de0c7 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -1016,7 +1016,11 @@ _ecore_main_prepare_handlers(void) /* call the prepare callback for all handlers with prep functions */ EINA_LIST_FOREACH_SAFE(fd_handlers_with_prep, l, l2, fdh) { - if (!fdh) fd_handlers_with_prep = eina_list_remove_list(l, fd_handlers_with_prep); + if (!fdh) + { + fd_handlers_with_prep = eina_list_remove_list(l, fd_handlers_with_prep); + continue; + } if (!fdh->delete_me && fdh->prep_func) { fdh->references++; @@ -1210,7 +1214,11 @@ _ecore_main_fd_handlers_cleanup(void) if (!fd_handlers_to_delete) return; EINA_LIST_FOREACH_SAFE(fd_handlers_to_delete, l, l2, fdh) { - if (!fdh) fd_handlers_to_delete = eina_list_remove_list(l, fd_handlers_to_delete); + if (!fdh) + { + fd_handlers_to_delete = eina_list_remove_list(l, fd_handlers_to_delete); + continue; + } /* fdh->delete_me should be set for all fdhs at the start of the list */ if (fdh->references) continue; @@ -1319,7 +1327,11 @@ _ecore_main_fd_handlers_buf_call(void) ret = 0; EINA_LIST_FOREACH_SAFE(fd_handlers_with_buffer, l, l2, fdh) { - if (!fdh) fd_handlers_with_buffer = eina_list_remove_list(l, fd_handlers_with_buffer); + if (!fdh) + { + fd_handlers_with_buffer = eina_list_remove_list(l, fd_handlers_with_buffer); + continue; + } if ((!fdh->delete_me) && fdh->buf_func) { fdh->references++;