/* insert to genlist */
if (_target_idx > 1) {
prev_item = elm_genlist_nth_item_get(_genlist, _target_idx);
- ret_if(NULL == prev_item);
+ if (NULL == prev_item) {
+ MGR_APP_DEBUG_ERR("prev_item is null");
+ goto end;
+ }
new_item = elm_genlist_item_insert_after(_genlist, itc, (void*)app_info_new, NULL, prev_item, ELM_GENLIST_ITEM_NONE, _gl_sel, (void*)ugd);
- ret_if(NULL == new_item);
+ if (NULL == new_item) {
+ MGR_APP_DEBUG_ERR("new_item is null");
+ goto end;
+ }
} else {
new_item = elm_genlist_item_append(_genlist, itc, (void*)app_info_new, NULL, ELM_GENLIST_ITEM_NONE, _gl_sel, (void*)ugd);
- ret_if(NULL == new_item);
+ if (NULL == new_item) {
+ MGR_APP_DEBUG_ERR("new_item is null");
+ goto end;
+ }
}
if (NULL == app_info_new->pkg_label) {
} else if (_target_idx == 1) {
next_item = elm_genlist_item_next_get(new_item);
- ret_if(NULL == next_item);
+ if (NULL == next_item) {
+ MGR_APP_DEBUG_ERR("next_item is null");
+ goto end;
+ }
next_info = (mgr_app_app_info_t *)elm_object_item_data_get(next_item);
- ret_if(NULL == next_info);
+ if (NULL == next_info) {
+ MGR_APP_DEBUG_ERR("next_info is null");
+ goto end;
+ }
if (NULL == next_info->pkg_label) {
MGR_APP_DEBUG_ERR("pkg_label is null");
} else if (_target_idx > 1 && _target_idx < _installed_cnt) {
prev_item = elm_genlist_item_prev_get(new_item);
- ret_if(NULL == prev_item);
+ if (NULL == prev_item) {
+ MGR_APP_DEBUG_ERR("prev_item is null");
+ goto end;
+ }
next_item = elm_genlist_item_next_get(new_item);
- ret_if(NULL == next_item);
+ if (NULL == next_item) {
+ MGR_APP_DEBUG_ERR("next_item is null");
+ goto end;
+ }
prev_info = (mgr_app_app_info_t *)elm_object_item_data_get(prev_item);
ret_if(NULL == prev_info);
} else if (_target_idx == _installed_cnt) {
prev_item = elm_genlist_item_prev_get(new_item);
- ret_if(NULL == prev_item);
+ if (NULL == prev_item) {
+ MGR_APP_DEBUG_ERR("prev_item is null");
+ goto end;
+ }
prev_info = (mgr_app_app_info_t *)elm_object_item_data_get(prev_item);
- ret_if(NULL == prev_info);
+ if (NULL == prev_info) {
+ MGR_APP_DEBUG_ERR("prev_info is null");
+ goto end;
+ }
if (NULL == next_info->pkg_label) {
MGR_APP_DEBUG_ERR("pkg_label is null");