From: DoHyun Pyun Date: Tue, 6 Dec 2016 08:50:50 +0000 (+0900) Subject: Fix the svace 2.2 issue X-Git-Tag: submit/tizen/20161219.233906~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F29%2F102929%2F1;p=apps%2Fnative%2Fbluetooth-share-ui.git Fix the svace 2.2 issue Change-Id: I74190c7492f63eabc32c13540f928a937258e0fb Signed-off-by: DoHyun Pyun --- diff --git a/src/bt-share-ui-ipc.c b/src/bt-share-ui-ipc.c index e06d9a0..facf293 100644 --- a/src/bt-share-ui-ipc.c +++ b/src/bt-share-ui-ipc.c @@ -524,8 +524,10 @@ static void __bt_add_tr_data_list(bt_share_appdata_t *ad, int transfer_type) if (info == NULL) { next = g_slist_next(next); - if (tr_data_list) - tr_data_list = g_slist_next(tr_data_list); + tr_data_list = g_slist_next(tr_data_list); + if (tr_data_list == NULL) + break; + if (git) git = elm_genlist_item_next_get(git); @@ -576,15 +578,18 @@ static void __bt_add_tr_data_list(bt_share_appdata_t *ad, int transfer_type) // Update data in list bt_tr_data_t *list_info = NULL; list_info = tr_data_list->data; - if (list_info->id == info->id) { - list_info->timestamp = info->timestamp; - list_info->tr_status = info->tr_status; - list_info->size = info->size; - if (list_info->type == NULL) - list_info->type = g_strdup(info->type); - - if (list_info->tr_status == BT_TRANSFER_ONGOING) - ad->current_item = git; + + if (list_info) { + if (list_info->id == info->id) { + list_info->timestamp = info->timestamp; + list_info->tr_status = info->tr_status; + list_info->size = info->size; + if (list_info->type == NULL) + list_info->type = g_strdup(info->type); + + if (list_info->tr_status == BT_TRANSFER_ONGOING) + ad->current_item = git; + } } } @@ -592,8 +597,8 @@ static void __bt_add_tr_data_list(bt_share_appdata_t *ad, int transfer_type) if (next == NULL) break; - if (tr_data_list) - tr_data_list = g_slist_next(tr_data_list); + tr_data_list = g_slist_next(tr_data_list); + if (git) git = elm_genlist_item_next_get(git); }