Fix the coverity issue 69/209469/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.014521 accepted/tizen/5.5/unified/mobile/hotfix/20201027.082806 accepted/tizen/5.5/unified/wearable/hotfix/20201027.123837 accepted/tizen/unified/20190708.114137 submit/tizen/20190708.064701 submit/tizen_5.5/20191031.000001 submit/tizen_5.5_mobile_hotfix/20201026.185101 submit/tizen_5.5_wearable_hotfix/20201026.184301 tizen_5.5.m2_release
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 8 Jul 2019 06:32:10 +0000 (15:32 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 8 Jul 2019 06:32:10 +0000 (15:32 +0900)
Change-Id: I965043b9853ed3645ae2d30e21ff5c4d6c47740c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bt-share-ui-view.c

index d736768..cfc52ee 100644 (file)
@@ -1083,7 +1083,7 @@ static void __bt_tr_data_item_sel(void *data, Evas_Object *obj, void *event_info
 
                        INFO_SECURE("path : %s", path);
 
-                       if (access(path, F_OK) == 0)
+                       if (path && access(path, F_OK) == 0)
                                __bt_open_file(path);
                        else
                                _bt_create_info_popup(ad, BT_STR_FILE_NOT_EXIST);
@@ -1094,7 +1094,7 @@ static void __bt_tr_data_item_sel(void *data, Evas_Object *obj, void *event_info
                path = info->file_path;
                INFO_SECURE("path : %s", path);
 
-               if (access(path, F_OK) == 0) {
+               if (path && access(path, F_OK) == 0) {
                        if (g_str_has_prefix(path, BT_CONTACT_SHARE_TMP_DIR) == TRUE)
                                /* TODO: change to proper string when UX is updated */
                                _bt_create_info_popup(ad, BT_STR_FILE_NOT_EXIST);