forked from enlightenment/efl
fix weird bug where fdh in a list could become null
SVN revision: 55044
This commit is contained in:
parent
fd44ecf46c
commit
3c05a283b6
|
@ -996,6 +996,7 @@ _ecore_main_prepare_handlers(void)
|
||||||
/* call the prepare callback for all handlers with prep functions */
|
/* call the prepare callback for all handlers with prep functions */
|
||||||
EINA_LIST_FOREACH_SAFE(fd_handlers_with_prep, l, l2, fdh)
|
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->delete_me && fdh->prep_func)
|
if (!fdh->delete_me && fdh->prep_func)
|
||||||
{
|
{
|
||||||
fdh->references++;
|
fdh->references++;
|
||||||
|
@ -1185,6 +1186,7 @@ _ecore_main_fd_handlers_cleanup(void)
|
||||||
if (!fd_handlers_to_delete) return;
|
if (!fd_handlers_to_delete) return;
|
||||||
EINA_LIST_FOREACH_SAFE(fd_handlers_to_delete, l, l2, fdh)
|
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);
|
||||||
/* fdh->delete_me should be set for all fdhs at the start of the list */
|
/* fdh->delete_me should be set for all fdhs at the start of the list */
|
||||||
if (fdh->references)
|
if (fdh->references)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1290,6 +1292,7 @@ _ecore_main_fd_handlers_buf_call(void)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
EINA_LIST_FOREACH_SAFE(fd_handlers_with_buffer, l, l2, fdh)
|
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->delete_me) && fdh->buf_func)
|
if ((!fdh->delete_me) && fdh->buf_func)
|
||||||
{
|
{
|
||||||
fdh->references++;
|
fdh->references++;
|
||||||
|
|
Loading…
Reference in New Issue