Fixed SVACE Errors 41/76241/4
authorbhutani.92 <bhutani.92@samsung.com>
Thu, 23 Jun 2016 07:44:00 +0000 (13:14 +0530)
committerbhutani.92 <bhutani.92@samsung.com>
Thu, 23 Jun 2016 08:30:47 +0000 (14:00 +0530)
Change-Id: Ie3c3b7b669464034b8679103e9f9f604738dc985
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
music-chooser/src/mc-track-list.c
music-chooser/tizen-manifest.xml
src/common/mp-app.c
src/common/mp-common.c
src/common/mp-edit-callback.c
src/common/mp-util.c
src/mp-main.c
src/view/mp-player-view.c

index 9cfe53e172c05037cb9b1c43de40a0db1a53ecb8..407cdb5dffffb005d30278f2ed3c04dfc17312a1 100755 (executable)
@@ -379,6 +379,9 @@ _get_total_size(void *data)
        item = elm_genlist_item_next_get(item);
        while (item) {
                list_item_data_t *it_data = elm_object_item_data_get(item);
+               if (!it_data) {
+                       continue;
+               }
                mp_media_info_h media = it_data->media;
                MP_CHECK_VAL(media, 0);
                mp_media_info_get_file_path(media, &path);
@@ -405,6 +408,9 @@ _get_media_list_count(void *data)
        item = elm_genlist_first_item_get(ld->genlist);
        while (item) {
                list_item_data_t *it_data = elm_object_item_data_get(item);
+               if (!it_data) {
+                       continue;
+               }
                item = elm_genlist_item_next_get(item);
                if (it_data) {
                        count++;
@@ -437,6 +443,9 @@ _get_select_count(void *data)//(Evas_Object *genlist)
        }
        while (item) {
                list_item_data_t *it_data = elm_object_item_data_get(item);
+               if (!it_data) {
+                       continue;
+               }
                item = elm_genlist_item_next_get(item);
                if (it_data && it_data->checked) {
                        count++;
@@ -456,6 +465,9 @@ static Elm_Object_Item  *_get_select_radio(void *data)
 
        while (item) {
                list_item_data_t *it_data = elm_object_item_data_get(item);
+               if (!it_data) {
+                       continue;
+               }
                item = elm_genlist_item_next_get(item);
 
                int index = elm_radio_value_get(g_radio_main);
@@ -619,7 +631,9 @@ void mc_track_list_set_uri_selected(void *thiz, const char *uri)
        while (item) {
                char *path = NULL;
                list_item_data_t *it_data = elm_object_item_data_get(item);
-
+               if (!it_data) {
+                       continue;
+               }
                mp_media_info_h media = it_data->media;
                MP_CHECK(media);
                mp_media_info_get_file_path(media, &path);
@@ -890,6 +904,9 @@ void _mc_track_list_select_all_selected_item_data_get(void *data, Evas_Object *o
        item = elm_genlist_item_next_get(item);
        while (item) {
                list_item_data_t *it_data = elm_object_item_data_get(item);
+               if (!it_data) {
+                       continue;
+               }
                it_data->checked = all_selected;
                Evas_Object *chk = elm_object_item_part_content_get(item, "elm.swallow.end");
                if (chk) {
index b2a19bd5cd50e7e864c7bd4a0bdf3cd407a7251b..4df6166f95644464da8f6d4d7ac8bd1fade7e7d1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <manifest xmlns="http://tizen.org/ns/packages" api-version="3.0" package="org.tizen.music-chooser" version="1.0.0">
     <profile name="mobile"/>
-    <ui-application appid="org.tizen.music-chooser" exec="music-chooser" hw-acceleration="on" launch_mode="caller" multiple="true" nodisplay="true" taskmanage="false" type="capp" hw-acceleration="on">
+    <ui-application appid="org.tizen.music-chooser" exec="music-chooser" hw-acceleration="on" launch_mode="caller" multiple="true" nodisplay="true" taskmanage="false" type="capp">
         <label>Music</label>
        <label xml:lang="hy-am">Երաժշտությն</label>
        <label xml:lang="az-az">Musiqi</label>
index e12aaa2fd0cf69fee0272aed383f61a21ee42f0b..ec3cd83908b49746095c17ad904b8b3b436e3667 100755 (executable)
@@ -402,6 +402,7 @@ void _mp_app_db_update_cb(void *data)
        EVENT_TRACE("Post DB Update event");
 
        struct appdata *ad = mp_util_get_appdata();
+       MP_CHECK(ad);
        //mp_plst_item *item = mp_playlist_mgr_get_current(ad->playlist_mgr);
 
        bool current_removed = false;
index 11b7ef466b4470633d1431dd36d94df6f4c37dc2..6648c217da3a1ed5bcbe8b083982b132a39c1366 100755 (executable)
@@ -2280,6 +2280,7 @@ void mp_common_playall_cb(void *data, Evas_Object * obj, void *event_info)
        eventfunc;
 
        struct appdata *ad = mp_util_get_appdata();
+       MP_CHECK(ad);
 
        MpList_t *list = data;
        MP_CHECK(list);
index 086dc9fcd9a6158fd798bc1e97271c1655cccfa3..4386598464f36509206a342b5b7a5d57d98a5c10 100755 (executable)
@@ -120,6 +120,7 @@ void mp_edit_create_track_delete_popup(void *data)
 {
        DEBUG_TRACE("");
        struct appdata *ad = mp_util_get_appdata();
+       MP_CHECK(ad);
        char *title_txt = NULL;
        char *title = NULL;
        char *help_txt = NULL;
@@ -2145,6 +2146,7 @@ mp_edit_create_delete_popup(void *data)
 {
        DEBUG_TRACE("");
        struct appdata *ad = mp_util_get_appdata();
+       MP_CHECK(ad);
 
        MpList_t *list = data;
        MP_CHECK(list);
index c7bc959727bae92ccf2578ea43db1e8d3d8d2919..41ea9d83ec02bb610fff8d7de82dd999a5c09e95 100755 (executable)
@@ -375,8 +375,6 @@ mp_util_create_image(Evas_Object * obj, const char *path, const char *group, int
                elm_image_file_set(image, path, group);
        }
 
-
-
        elm_image_resizable_set(image, EINA_TRUE, EINA_TRUE);
        evas_object_size_hint_align_set(image, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_size_hint_weight_set(image, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -2216,6 +2214,7 @@ EXPORT_API void dump_win(Evas_Object *obj, int max_depth)
        }
 
        void *pData = evas_object_smart_data_get(obj);
+       MP_CHECK(pData);
        volatile int Diff;
 
        Diff = 0xC4;
@@ -2641,6 +2640,7 @@ void mp_post_notification_indicator(char *status)
        startfunc;
 
        struct appdata *ad = mp_util_get_appdata();
+       MP_CHECK(ad);
        int ret = NOTIFICATION_ERROR_NONE;
 
        int applist = NOTIFICATION_DISPLAY_APP_INDICATOR;
@@ -2682,6 +2682,10 @@ void mp_noti_read_ini_file(void *data, Ecore_File_Monitor *em, Ecore_File_Event
        }
        char str[1000] = {0,};
        FILE *file = fopen(path, "r");
+       if (!file) {
+               ERROR_TRACE("File doesn't exists");
+               return;
+       }
 
        char *sptr = NULL;
        while (fgets(str, sizeof(str), file)) {
@@ -2698,6 +2702,10 @@ void mp_noti_read_ini_file(void *data, Ecore_File_Monitor *em, Ecore_File_Event
                        continue;
                }
 
+               if (key == NULL) {
+                       continue;
+               }
+
                if (!strcmp(key, "status")) {
                        mp_post_notification_indicator(value);
                        break;
index 9c289bd8355681dc19e716874a1be09c1cf579c4..3704a1b2acc0374c195e5b7cfacca498e889294e 100755 (executable)
@@ -1397,9 +1397,6 @@ mp_create(void *data)
        PROFILE_OUT("elm_theme_extension_add");
 
        char locale_path[1024] = {0};
-       if (path == NULL) {
-               return false;
-       }
        snprintf(locale_path, 1024, "%s%s", path, LOCALE_DIR);
        free(path);
        PROFILE_IN("bindtextdomain");
index 16c38e69bd8ac64bbde695b3b2fddc9bac71de43..7d48b5e64e35886511cded96c6d82b0df58be7ba 100755 (executable)
@@ -735,6 +735,9 @@ _mp_player_view_add_playlist_select_cb(void *data, Evas_Object * obj, void *even
        mp_media_info_h item_handler = data;
 
        Popup_genlist_item *gli_data = elm_object_item_data_get(event_info);
+       if (!gli_data) {
+               return;
+       }
        mp_media_info_h plst = gli_data->item_data;
 
        char *playlist_name = NULL;