forked from enlightenment/efl
Add a sanity check, if there is no group of interest found, then this is
not a .desktop that anybody would be interested in. SVN revision: 26111
This commit is contained in:
parent
1027e2004c
commit
e43d359810
|
@ -454,6 +454,13 @@ _ecore_desktop_get(const char *file, const char *lang)
|
|||
}
|
||||
}
|
||||
|
||||
/* Final sanity check. */
|
||||
if ((result->data) && (!result->group))
|
||||
{
|
||||
_ecore_desktop_destroy(result);
|
||||
result = NULL;
|
||||
}
|
||||
else
|
||||
ecore_hash_set(desktop_cache, strdup(result->original_path), result);
|
||||
}
|
||||
|
||||
|
@ -489,7 +496,7 @@ ecore_desktop_save(Ecore_Desktop * desktop)
|
|||
{
|
||||
if ((desktop->ondisk) && (desktop->original_path))
|
||||
{
|
||||
if (!desktop->data) desktop->data = ecore_desktop_ini_get(desktop->original_path);
|
||||
desktop->data = ecore_desktop_ini_get(desktop->original_path);
|
||||
desktop->group =
|
||||
(Ecore_Hash *) ecore_hash_get(desktop->data, "Desktop Entry");
|
||||
if (!desktop->group)
|
||||
|
|
Loading…
Reference in New Issue