From d00be413d6ce6706d03638886efc03c5d4c57a3c Mon Sep 17 00:00:00 2001 From: liuyongkai2 Date: Fri, 25 Jul 2025 21:58:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuyongkai2 --- .../components/indexer/render_indexer_circle.cpp | 3 ++- .../interfaces/native/ani/ace_ani_global_reference.h | 2 +- interfaces/ets/ani/animator/src/animator.cpp | 12 +++--------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/frameworks/core/components/indexer/render_indexer_circle.cpp b/frameworks/core/components/indexer/render_indexer_circle.cpp index a407525097b..6fea9a22692 100644 --- a/frameworks/core/components/indexer/render_indexer_circle.cpp +++ b/frameworks/core/components/indexer/render_indexer_circle.cpp @@ -705,7 +705,8 @@ void RenderIndexerCircle::SetCollapseItemPosition(double position) item->SetVisible(true); } - if (finalPosition < itemInfo_[collapseItemCount_][TABLE_ANGLE]) { + if (collapseItemCount_ >= 0 && collapseItemCount_ < itemInfo_.size() && + finalPosition < itemInfo_[collapseItemCount_][TABLE_ANGLE]) { finalPosition = itemInfo_[collapseItemCount_][TABLE_ANGLE]; } diff --git a/frameworks/core/interfaces/native/ani/ace_ani_global_reference.h b/frameworks/core/interfaces/native/ani/ace_ani_global_reference.h index d07a5477f21..c48dff568ff 100644 --- a/frameworks/core/interfaces/native/ani/ace_ani_global_reference.h +++ b/frameworks/core/interfaces/native/ani/ace_ani_global_reference.h @@ -25,7 +25,7 @@ class AceAniGlobalReference : public AceType { DECLARE_ACE_TYPE(AceAniGlobalReference, AceType); public: - AceAniGlobalReference(ani_env* env, ani_ref ref) : env_(env) + AceAniGlobalReference(ani_env* env, ani_ref ref) : env_(env), ref_(nullptr) { if (env_) { env_->GlobalReference_Create(ref, &ref_); diff --git a/interfaces/ets/ani/animator/src/animator.cpp b/interfaces/ets/ani/animator/src/animator.cpp index ef30e95a198..5068ca26822 100644 --- a/interfaces/ets/ani/animator/src/animator.cpp +++ b/interfaces/ets/ani/animator/src/animator.cpp @@ -688,10 +688,7 @@ static ani_object AnimatorTransferStatic(ani_env *aniEnv, ani_object, ani_object animatorResult->SetMotion(motion); animatorResult->SetAnimatorOption(option); animatorResult->SetAnimator(animator); - if (ANI_OK != aniEnv->Object_New(cls, ctor, &animatorObj, reinterpret_cast(animatorResult))) { - TAG_LOGI(AceLogTag::ACE_ANIMATION, "[ANI] create animatorResult fail"); - return animatorObj; - } + aniEnv->Object_New(cls, ctor, &animatorObj, reinterpret_cast(animatorResult)); return animatorObj; } @@ -906,11 +903,8 @@ void ANICreateSimpleAnimatorOptionsWithParam(ani_env* env, [[maybe_unused]] ani_ JsSimpleAnimatorOption* simpleAnimatorOption = new JsSimpleAnimatorOption(); simpleAnimatorOption->SetBegin(static_cast(start)); simpleAnimatorOption->SetEnd(static_cast(end)); - if (ANI_OK != - env->Object_SetPropertyByName_Long(object, "SimpleAnimatorOptionsResult", - reinterpret_cast(simpleAnimatorOption))) { - return; - } + env->Object_SetPropertyByName_Long(object, "SimpleAnimatorOptionsResult", + reinterpret_cast(simpleAnimatorOption)); } ani_object ANISetSimpleAnimatorDuration(ani_env* env, [[maybe_unused]] ani_object object, -- Gitee