options_wallpaper: fix CID 1339835: Null pointer dereference

This commit is contained in:
Boris Faure 2015-11-19 21:02:21 +01:00
parent 224173f88d
commit bb2d7c4250
1 changed files with 9 additions and 6 deletions

View File

@ -230,15 +230,18 @@ _rec_read_directorys(Eina_List *list, const char *root_path,
item = calloc(1, sizeof(Background_Item)); item = calloc(1, sizeof(Background_Item));
if (item) if (item)
{ {
notify = calloc(1, notify = calloc(1,
sizeof(Insert_Gen_Grid_Item_Notify)); sizeof(Insert_Gen_Grid_Item_Notify));
item->path = eina_stringshare_add(path); item->path = eina_stringshare_add(path);
list = eina_list_append(list, item); list = eina_list_append(list, item);
//insert item to gengrid if (notify)
notify->class = class; {
notify->item = item; //insert item to gengrid
//ecore_thread_feedback(th, notify); notify->class = class;
_insert_gengrid_item(notify); notify->item = item;
//ecore_thread_feedback(th, notify);
_insert_gengrid_item(notify);
}
} }
break; break;
} }