!32258 修复observer监听scrollEvent偶现闪退

Merge pull request !32258 from 徐钦锋/observerHandler
This commit is contained in:
openharmony_ci 2024-05-09 02:10:57 +00:00 committed by Gitee
commit 5ede8e613f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -57,6 +57,7 @@ void UIObserverHandler::NotifyScrollEventStateChange(const WeakPtr<AceType>& wea
auto pattern = AceType::DynamicCast<ScrollablePattern>(ref);
CHECK_NULL_VOID(pattern);
auto host = pattern->GetHost();
CHECK_NULL_VOID(host);
std::string id = host->GetInspectorId().value_or("");
float offset = pattern->GetTotalOffset();
CHECK_NULL_VOID(scrollEventHandleFunc_);