efreet - convert crash into NULL mimes when no mime db found

so ok - efreet crashed letting you know you have a missing mimedb...
return NULL instead fixes T4425 :) - rememebr to kill your efreetd's
to get a new mimedb - log out and in will do that.
This commit is contained in:
Carsten Haitzler 2016-08-24 10:00:50 +09:00
parent 27d428a6e1
commit 510c093602
1 changed files with 2 additions and 0 deletions

View File

@ -454,6 +454,7 @@ efreet_mime_type_get(const char *file)
const char *type = NULL;
EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
if (!mimedb_ptr) return NULL;
if ((type = efreet_mime_special_check(file)))
return type;
@ -586,6 +587,7 @@ efreet_mime_globs_type_get(const char *file)
unsigned int i, n;
EINA_SAFETY_ON_NULL_RETURN_VAL(file, NULL);
if (!mimedb_ptr) return NULL;
/* Check in the extension hash for the type */
ext = strchr(file, '.');