Add to check return value. 04/204404/1 submit/tizen/20190423.120739
authorjinwang.an <jinwang.an@samsung.com>
Tue, 23 Apr 2019 11:55:54 +0000 (20:55 +0900)
committerjinwang.an <jinwang.an@samsung.com>
Tue, 23 Apr 2019 11:55:54 +0000 (20:55 +0900)
 - storage_get_misces_item()

Change-Id: I80d5e52f24d5c8ba614b7821e75822755e118777
Signed-off-by: jinwang.an <jinwang.an@samsung.com>
setting-storage/src/setting-storage-utils.c

index 175b9efef3ce26d3a5356be524469835a3b8fcb2..33ee2cbec68da606f91903304500db5b752424b3 100644 (file)
@@ -139,7 +139,11 @@ static bool storage_get_misces_item(media_info_h media, void *data)
        retv_if(NULL == media, true);
        retv_if(NULL == data, false);
        char *file_path = NULL;
-       media_info_get_file_path(media, &file_path);
+       int ret = media_info_get_file_path(media, &file_path);
+       if (MEDIA_CONTENT_ERROR_NONE != ret) {
+               SETTING_TRACE_DEBUG("media_info_get_file_path() error : %s", get_error_message(ret));
+               return true;
+       }
        if (!ecore_file_exists(file_path)) {
                SETTING_TRACE_DEBUG("!ecore_file_exists(file_path)");
                FREE(file_path);