Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_file


Modified Files:
        ecore_file_monitor_poll.c 


Log Message:
Stop a seg on stopping '/' monitoring in ecore_file_monitor_poll 

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ecore_file_monitor_poll.c   15 Aug 2005 08:05:50 -0000      1.10
+++ ecore_file_monitor_poll.c   27 Aug 2005 03:23:10 -0000      1.11
@@ -161,15 +161,18 @@
      }
 
    /* 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);
 




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to