mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-12-12 10:31:56 +00:00
gesture recognizer add nullptr judgement
Signed-off-by: zhouchaobo <zhouchaobo@huawei.com> Change-Id: I2384b03e97f5e51d8cf1f11aaf23ce3877ffaad9
This commit is contained in:
parent
e2fdc5ac79
commit
9bda2921c8
@ -389,6 +389,7 @@ void NGGestureRecognizer::HandleWillAccept()
|
||||
auto node = GetAttachedNode().Upgrade();
|
||||
if (AceType::InstanceOf<ClickRecognizer>(this)) {
|
||||
auto clickRecognizer = AceType::DynamicCast<ClickRecognizer>(this);
|
||||
CHECK_NULL_VOID(clickRecognizer);
|
||||
GestureEvent gestureEventInfo = clickRecognizer->GetGestureEventInfo();
|
||||
ClickInfo clickInfo = clickRecognizer->GetClickInfo();
|
||||
UIObserverHandler::GetInstance().NotifyWillClick(gestureEventInfo, clickInfo, node);
|
||||
@ -400,6 +401,7 @@ void NGGestureRecognizer::HandleDidAccept()
|
||||
auto node = GetAttachedNode().Upgrade();
|
||||
if (AceType::InstanceOf<ClickRecognizer>(this)) {
|
||||
auto clickRecognizer = AceType::DynamicCast<ClickRecognizer>(this);
|
||||
CHECK_NULL_VOID(clickRecognizer);
|
||||
GestureEvent gestureEventInfo = clickRecognizer->GetGestureEventInfo();
|
||||
ClickInfo clickInfo = clickRecognizer->GetClickInfo();
|
||||
UIObserverHandler::GetInstance().NotifyDidClick(gestureEventInfo, clickInfo, node);
|
||||
|
Loading…
Reference in New Issue
Block a user