Ecore ecore_file.c: NULL check before using strcmp().
authorseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 29 Mar 2011 02:28:41 +0000 (02:28 +0000)
committerseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 29 Mar 2011 02:28:41 +0000 (02:28 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@58168 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_file/ecore_file.c

index cd29a33..906c652 100644 (file)
@@ -154,6 +154,7 @@ EAPI Eina_Bool
 ecore_file_exists(const char *file)
 {
    struct stat st;
+   if (!file) return EINA_FALSE;
 
    /*Workaround so that "/" returns a true, otherwise we can't monitor "/" in ecore_file_monitor*/
    if (stat(file, &st) < 0 && strcmp(file, "/")) return EINA_FALSE;