diff --git a/src/draw/vg_lite/lv_vg_lite_path.c b/src/draw/vg_lite/lv_vg_lite_path.c index 9a840fb43..3efe5070c 100644 --- a/src/draw/vg_lite/lv_vg_lite_path.c +++ b/src/draw/vg_lite/lv_vg_lite_path.c @@ -104,9 +104,8 @@ void lv_vg_lite_path_destroy(lv_vg_lite_path_t * path) lv_free(path->base.path); path->base.path = NULL; - if(path->base.stroke) { - LV_LOG_ERROR("can't free stroke path"); - } + /* clear remaining path data */ + LV_VG_LITE_CHECK_ERROR(vg_lite_clear_path(&path->base)); } lv_free(path); LV_PROFILER_END; diff --git a/src/others/vg_lite_tvg/vg_lite_tvg.cpp b/src/others/vg_lite_tvg/vg_lite_tvg.cpp index b4e96f6d7..97c63d71d 100644 --- a/src/others/vg_lite_tvg/vg_lite_tvg.cpp +++ b/src/others/vg_lite_tvg/vg_lite_tvg.cpp @@ -888,7 +888,7 @@ extern "C" { path->stroke = NULL; } - return VG_LITE_NOT_SUPPORT; + return VG_LITE_SUCCESS; } vg_lite_uint32_t vg_lite_get_path_length(vg_lite_uint8_t * opcode, @@ -2136,9 +2136,7 @@ static Result shape_append_path(std::unique_ptr & shape, vg_lite_path_t * break; case VLC_OP_CLOSE: - case VLC_OP_END: { - TVG_CHECK_RETURN_RESULT(shape->close()); - } + TVG_CHECK_RETURN_RESULT(shape->close()); break; default: