fix segv..

SVN revision: 48553
This commit is contained in:
Hannes Janetzek 2010-05-02 17:42:08 +00:00
parent d7e965fdb8
commit 2b4133e32b
1 changed files with 6 additions and 2 deletions

View File

@ -71,7 +71,7 @@ _begin_open_with(Evry_Plugin *plugin, const Evry_Item *item)
Efreet_Desktop *d, *d2;
const char *mime;
const char *path;
const char *path = NULL;
if (CHECK_TYPE(item, EVRY_TYPE_ACTION))
{
@ -94,8 +94,12 @@ _begin_open_with(Evry_Plugin *plugin, const Evry_Item *item)
path = file->path;
mime = file->mime;
}
else
{
return NULL;
}
if (!mime || !(mime = efreet_mime_type_get(path)))
if (!path || !mime || !(mime = efreet_mime_type_get(path)))
return NULL;
p->apps_mime = efreet_util_desktop_mime_list(mime);