Resolved SVACE issues 19/74819/2 accepted/tizen/mobile/20160617.084428 submit/tizen_mobile/20160616.150542 submit/tizen_mobile/20160620.141732
authorChandan <ch.kumar@samsung.com>
Wed, 15 Jun 2016 15:19:50 +0000 (20:49 +0530)
committerChandan <ch.kumar@samsung.com>
Wed, 15 Jun 2016 15:45:21 +0000 (21:15 +0530)
Change-Id: Ib17de8dd84930825faff8228affda6bf9fefb1b7
Signed-off-by: Chandan <ch.kumar@samsung.com>
src/2dview/gl-timeline.c
src/util/gl-util.c

index 4410fd9..8119664 100644 (file)
@@ -2755,6 +2755,9 @@ static void _gl_time_view_append_gengrid_items(Evas_Object *
        Elm_Object_Item *gridItem = NULL;
        for (; (nIndex < nMaxIndex) && (nIndex < nVideoListSize) && (k <= numberOfItemsOnParticularDate) ; nIndex++) {
                item = eina_list_nth(timeline_d->data_list, nIndex);
+               if (!item) {
+                       continue;
+               }
                gridItem =
                    elm_gengrid_item_append(pGengrid, gic, item, __gl_timeline_thumbs_sel_cb, timeline_d);
                elm_gengrid_item_select_mode_set(gridItem,
@@ -3028,6 +3031,9 @@ int _gl_timeline_create_grid_view(gl_timeline_s *timeline_d, Evas_Object *genlis
        char *text = NULL;
        for (i = 0; i < item_cnt; i++) {
                item = eina_list_nth(list, i);
+               if (!item) {
+                       continue;
+               }
 
                number_of_items_on_particular_date = _get_count_of_items_on_same_date(item, list, &text, i + 1);
                items_per_row = _gl_time_get_number_of_items_per_row(timeline_d->ad);
@@ -3076,6 +3082,7 @@ static void __gl_timeline_genlist_move_cb(void *data, Evas_Object *obj, void *ei
                        Elm_Object_Item *it = elm_gengrid_first_item_get(grid);
                        if (it) {
                                gl_media_s *item = (gl_media_s *)elm_object_item_data_get(it);
+                               GL_CHECK(item);
                                char *text1 = NULL;
                                char *text2 = NULL;
                                struct tm t1;
@@ -4846,6 +4853,9 @@ int _gl_ext_load_time_iv_selected_list(app_control_h service, void *data)
 
        for (i = 0; i < count; i++) {
                gitem = eina_list_nth(ad->tlinfo->sel_d->sel_list, i);
+               if (!gitem) {
+                       continue;
+               }
                EINA_LIST_FOREACH(ad->tlinfo->data_list, l, item) {
                        if (!item) {
                                continue;
index 07752c2..93e488e 100644 (file)
@@ -1264,6 +1264,7 @@ int _gl_del_media_by_id(void *data, const char *uuid)
        media_info_h media_h = NULL;
        media_content_storage_e storage_type = 0;
        int ret = -1;
+       char *path = NULL;
 
        ret = media_info_get_media_from_db(uuid, &media_h);
        if (ret != MEDIA_CONTENT_ERROR_NONE || media_h == NULL) {
@@ -1275,7 +1276,6 @@ int _gl_del_media_by_id(void *data, const char *uuid)
                gl_dbgE("Get storage type failed!");
                goto DEL_MEDIA_BY_ID_FAILED;
        }
-       char *path = NULL;
        ret = media_info_get_file_path(media_h, &path);
        if (ret != MEDIA_CONTENT_ERROR_NONE) {
                gl_dbgE("Get media file path failed!");