fixed TCT failure issues 46/99846/1 submit/tizen/20161125.033156
authorchanywa <cbible.kim@samsung.com>
Thu, 24 Nov 2016 08:37:10 +0000 (17:37 +0900)
committerchanywa <cbible.kim@samsung.com>
Thu, 24 Nov 2016 08:37:10 +0000 (17:37 +0900)
Change-Id: Ia2e5655302f60d8c2bd4993dcbcc6e457bb3a79a

src/mapzen_plugin.c

index 9804615..5aaaf8d 100644 (file)
@@ -1190,7 +1190,10 @@ static void __mapzen_place_search_cb(mapzen_error_e result, int request_id, GLis
                                        cats = g_list_next(cats);
                                }
 
-                               if (g_list_length(cat_list) > 0) {
+                               //if (g_list_length(cat_list) > 0) {
+                               int length = 0;
+                               maps_item_list_get_length(cat_list, &length);
+                               if (length > 0) {
                                        maps_place_set_categories(place, cat_list);
                                        maps_item_list_remove_all(cat_list, maps_place_category_destroy);
                                }
@@ -1295,6 +1298,11 @@ static void __mapzen_place_search_cb(mapzen_error_e result, int request_id, GLis
                                /*}*/
 
                                /*if (g_list_length(cat_list) > 0) {*/
+                               /*
+                               int length = 0;
+                               maps_item_list_get_length(cat_list, &length);
+                               if (length > 0) {
+                               */
                                        /*maps_place_set_categories(place, cat_list);*/
                                        /*maps_item_list_remove_all(cat_list, maps_place_category_destroy);*/
                                /*}*/
@@ -1394,7 +1402,10 @@ static void __maps_service_search_place_list_cb(mapzen_error_e result, int reque
                                        cats = g_list_next(cats);
                                }
 
-                               if (g_list_length(cat_list) > 0) {
+                               //if (g_list_length(cat_list) > 0) {
+                               int length = 0;
+                               maps_item_list_get_length(cat_list, &length);
+                               if (length > 0) {
                                        maps_place_set_categories(place, cat_list);
                                        maps_item_list_remove_all(cat_list, maps_place_category_destroy);
                                }
@@ -1415,7 +1426,7 @@ static void __maps_service_search_place_list_cb(mapzen_error_e result, int reque
                                /*maps_item_list_destroy(image_list); */
 
                                maps_item_list_append(place_list, place, maps_place_clone);
-                               maps_place_image_destroy(place);
+                               maps_place_destroy(place);
                                place = NULL;
                                temp_place = temp_place->next;
                        }