Enlightenment CVS committal Author : englebass Project : e17 Module : libs/efreet
Dir : e17/libs/efreet/src/lib Modified Files: efreet_utils.c Log Message: Fix segv. Create struct before adding it to the hash. =================================================================== RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_utils.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- efreet_utils.c 10 Apr 2007 07:18:51 -0000 1.30 +++ efreet_utils.c 10 Apr 2007 16:11:54 -0000 1.31 @@ -517,22 +517,20 @@ ud = ecore_hash_get(desktop_by_file_id, file_id); if (!ud) { + ud = NEW(Efreet_Util_Desktop, 1); + ud->priority = priority; + ud->desktop = desktop; + + ecore_hash_set(desktop_by_file_id, (void *)ecore_string_instance(file_id), ud); if (event) { Efreet_Event_Desktop_Change *ev; - ud = NEW(Efreet_Util_Desktop, 1); - ud->priority = priority; - ud->desktop = desktop; - ecore_hash_set(desktop_by_file_id, (void *)ecore_string_instance(file_id), ud); - ev = NEW(Efreet_Event_Desktop_Change, 1); ev->current = desktop; ev->change = EFREET_DESKTOP_CHANGE_ADD; ecore_event_add(EFREET_EVENT_DESKTOP_CHANGE, ev, NULL, NULL); } - else - ecore_hash_set(desktop_by_file_id, (void *)ecore_string_instance(file_id), ud); } else if (priority < ud->priority) { ------------------------------------------------------------------------- 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