if (list->function_type == MP_LIST_FUNC_ADD_TRACK) {
MpViewMgr_t *view_manager = mp_view_mgr_get_view_manager();
- MP_CHECK(view_manager);
+ if (!view_manager) {
+ if (name) {
+ free(name);
+ name = NULL;
+ }
+ if (artist) {
+ free(artist);
+ artist = NULL;
+ }
+ return;
+ }
MpSelectTrackView_t *view_select_track =
mp_select_track_view_create(view_manager->navi);
- MP_CHECK(view_select_track);
+ if (!view_select_track) {
+ if (name) {
+ free(name);
+ name = NULL;
+ }
+ if (artist) {
+ free(artist);
+ artist = NULL;
+ }
+ return;
+ }
mp_view_mgr_push_view(view_manager, (MpView_t *) view_select_track,
NULL);
mp_list_update(view_select_track->content_to_show);
mp_view_update_options((MpView_t *) view_select_track);
mp_list_set_edit(view_select_track->content_to_show, TRUE);
+ if (name) {
+ free(name);
+ name = NULL;
+ }
+ if (artist) {
+ free(artist);
+ artist = NULL;
+ }
return;
}
MpViewMgr_t *view_mgr = mp_view_mgr_get_view_manager();
MpView_t *view = mp_view_mgr_get_top_view(view_mgr);
mp_view_update_options_edit(view);
+ if (name) {
+ free(name);
+ name = NULL;
+ }
+ if (artist) {
+ free(artist);
+ artist = NULL;
+ }
return;
}
/* create the view of album detail */
MpViewMgr_t *view_manager = mp_view_mgr_get_view_manager();
- MP_CHECK(view_manager);
+ if (!view_manager) {
+ if (name) {
+ free(name);
+ name = NULL;
+ }
+ if (artist) {
+ free(artist);
+ artist = NULL;
+ }
+ return;
+ }
MpAlbumDetailView_t *view_album_detail =
mp_album_detail_view_create(view_manager->navi, name, artist,
thumbnail);
mp_view_update_options((MpView_t *) view_album_detail);
mp_view_set_title((MpView_t *) view_album_detail, name);
+ if (name) {
+ free(name);
+ name = NULL;
+ }
+ if (artist) {
+ free(artist);
+ artist = NULL;
+ }
}
char *_mp_album_list_recently_added_text_get(void *data, Evas_Object * obj, const char *part)
if (!item) {
DEBUG_TRACE
("Fail to mp_media_info_group_list_nth_item, index[%d]", index);
+ if (thumb_path) {
+ free(thumb_path);
+ thumb_path = NULL;
+ }
return NULL;
}
mp_media_info_group_get_thumbnail_path(item, &thumb_path);
}
mp_list_item_data_t *item_data = calloc(1, sizeof(mp_list_item_data_t));
- MP_CHECK_NULL(item_data);
+ if (!item_data) {
+ if (thumb_path) {
+ free(thumb_path);
+ thumb_path = NULL;
+ }
+ return NULL;
+ }
item_data->handle = item;
item_data->index = index;
item_data->group_type = MP_GROUP_BY_ALBUM;
evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
Evas_Object* image = elm_image_add(obj);
- elm_image_file_set(image, thumb_path,NULL);
+ elm_image_file_set(image, thumb_path, NULL);
elm_image_fill_outside_set(image, true);
elm_image_resizable_set(image, EINA_TRUE, EINA_TRUE);
evas_object_size_hint_align_set(image, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_data_set(content, "genlist_obj", list->genlist);
elm_object_signal_callback_add(content, "mouse,clicked,1", "*",
_mp_album_list_recently_added_thumbpath_clicked_cb, item_data);
+ if (thumb_path) {
+ free(thumb_path);
+ thumb_path = NULL;
+ }
return content;
}
part_name[0] = '\0';
evas_object_data_set(content, "genlist_obj", list->genlist);
elm_object_signal_callback_add(content, "mouse,clicked,1", "*",
_mp_album_list_recently_added_play_icon_clicked_cb, item_data);
+ if (thumb_path) {
+ free(thumb_path);
+ thumb_path = NULL;
+ }
return content;
}
+ if (thumb_path) {
+ free(thumb_path);
+ thumb_path = NULL;
+ }
}
return NULL;
}
if (ad->checkedList) {
ad->checkedList = g_list_first(ad->checkedList);
GList *l;
- for(l = ad->checkedList ; l !=NULL ; l = l->next) {
- if(g_strcmp0(l->data, file_path) == 0) {
+ for (l = ad->checkedList ; l != NULL ; l = l->next) {
+ if (g_strcmp0(l->data, file_path) == 0) {
item_data->checked = EINA_TRUE;
break;
}
}
mp_list_item_data_t *item_data = calloc(1, sizeof(mp_list_item_data_t));
- MP_CHECK_NULL(item_data);
+ if (!item_data) {
+ if (thumb_path) {
+ free(thumb_path);
+ thumb_path = NULL;
+ }
+ return NULL;
+ }
item_data->handle = item;
item_data->index = index;
item_data->group_type = MP_GROUP_NONE;
evas_object_data_set(content, "genlist_obj", list->genlist);
elm_object_signal_callback_add(content, "mouse,clicked,1", "*",
_mp_track_list_recently_added_thumbpath_clicked_cb, NULL);
+ if (thumb_path) {
+ free(thumb_path);
+ thumb_path = NULL;
+ }
return content;
}
part_name[0] = '\0';
evas_object_data_set(content, "genlist_obj", list->genlist);
elm_object_signal_callback_add(content, "mouse,clicked,1", "*",
_mp_track_list_recently_added_play_icon_clicked_cb, item_data);
+ if (thumb_path) {
+ free(thumb_path);
+ thumb_path = NULL;
+ }
return content;
}
+ if (thumb_path) {
+ free(thumb_path);
+ thumb_path = NULL;
+ }
}
return NULL;
}