Stop a seg on stopping '/' monitoring in ecore_file_monitor_poll

SVN revision: 16377
This commit is contained in:
lordchaos 2005-08-27 03:23:10 +00:00 committed by lordchaos
parent e0d908af71
commit 5e18e6ef44
1 changed files with 12 additions and 9 deletions

View File

@ -161,15 +161,18 @@ ecore_file_monitor_poll_del(Ecore_File_Monitor *em)
}
/* Remove files */
for (l = em->files; l;)
{
Ecore_File *file;
file = (Ecore_File *)l;
l = l->next;
free(file->name);
free(file);
}
/*It's possible there weren't any files to monitor, so check if the list is init*/
if (em->files) {
for (l = em->files; l;)
{
Ecore_File *file;
file = (Ecore_File *)l;
l = l->next;
free(file->name);
free(file);
}
}
_monitors = _ecore_list_remove(_monitors, em);