Svace issue fix
[platform/core/multimedia/libmedia-service.git] / src / common / media-svc-media.c
index ee0e238..9ba27cb 100755 (executable)
@@ -500,7 +500,7 @@ int _media_svc_delete_invalid_items(sqlite3 *handle, const char *storage_id, med
        }
 
        /*Delete thumbnails*/
-       while (thumb_list->len != 0) {
+       while ((thumb_list != NULL) && (thumb_list->len != 0)) {
                char *thumb_path = NULL;
                thumb_path = g_array_index(thumb_list , char*, 0);
                g_array_remove_index(thumb_list, 0);