/* Selector View is launched. Checked Items list is initially freed */
ad->selector_mode_bit = EINA_TRUE;
GList *list = ad->checkedList;
- if (list) {
- while(list){
- char *data = list->data;
- IF_FREE(data);
- list = g_list_next(list);
- }
- g_list_free(list);
- list = NULL;
+ while(list != NULL){
+ GList *next = list->next;
+ char *data = list->data;
+ IF_FREE(data);
+ ad->checkedList = g_list_delete_link(ad->checkedList, list);
+ list = next;
}
Evas_Object *obj;
mp_view_update_options((MpView_t *) view);
/*update title */
- int count = g_list_length(ad->checkedList);
+ int count = 0;
+ if (ad->checkedList) {
+ count = g_list_length(ad->checkedList);
+ }
+
if (count > 0) {
char *text = g_strdup_printf(GET_STR(STR_MP_SELECT_ITEMS), count);
mp_view_set_title((MpView_t *) view, text);