* ecore: Handle NULL in ecore_file_dir_get.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 20 Jan 2010 12:41:22 +0000 (12:41 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 20 Jan 2010 12:41:22 +0000 (12:41 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@45352 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ecore_file/ecore_file.c

index 1bfcaee..2dcff23 100644 (file)
@@ -600,6 +600,7 @@ ecore_file_dir_get(const char *file)
    char *p;
    char buf[PATH_MAX];
 
+   if (!file) return NULL;
    strncpy(buf, file, PATH_MAX);
    p = dirname(buf);
    return strdup(p);