Enlightenment CVS committal Author : onefang Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_desktop Modified Files: ecore_desktop.c Log Message: Add a sanity check, if there is no group of interest found, then this is not a .desktop that anybody would be interested in. =================================================================== RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_desktop/ecore_desktop.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -3 -r1.47 -r1.48 --- ecore_desktop.c 24 Sep 2006 19:27:20 -0000 1.47 +++ ecore_desktop.c 24 Sep 2006 19:55:06 -0000 1.48 @@ -454,7 +454,14 @@ } } - ecore_hash_set(desktop_cache, strdup(result->original_path), result); + /* 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); } error: @@ -489,7 +496,7 @@ { 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) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs