From 640b82010a0bb931ee84e5b89c7fbe5ec1d1262c Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Wed, 20 Dec 2023 13:02:14 +0900 Subject: [PATCH] [Tizen] Fix svace issue (accessible null check) Change-Id: I71afc8e98a9e8eef985130757091cd8e5fed4182 Signed-off-by: Eunki, Hong --- .../internal/controls/control/control-data-impl.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dali-toolkit/internal/controls/control/control-data-impl.cpp b/dali-toolkit/internal/controls/control/control-data-impl.cpp index f434dc1..9feff1c 100644 --- a/dali-toolkit/internal/controls/control/control-data-impl.cpp +++ b/dali-toolkit/internal/controls/control/control-data-impl.cpp @@ -719,20 +719,22 @@ void Control::Impl::UnregisterAccessibilityPropertySetSignal() void Control::Impl::OnAccessibilityPropertySet(Dali::Handle& handle, Dali::Property::Index index, const Dali::Property::Value& value) { auto* accessible = GetAccessibleObject(); - - if(mAccessibilityGetNameSignal.Empty()) + if(DALI_LIKELY(accessible)) { - if(index == DevelControl::Property::ACCESSIBILITY_NAME || (mAccessibilityName.empty() && index == accessible->GetNamePropertyIndex())) + if(mAccessibilityGetNameSignal.Empty()) { - accessible->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::NAME); + if(index == DevelControl::Property::ACCESSIBILITY_NAME || (mAccessibilityName.empty() && index == accessible->GetNamePropertyIndex())) + { + accessible->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::NAME); + } } - } - if(mAccessibilityGetDescriptionSignal.Empty()) - { - if(index == DevelControl::Property::ACCESSIBILITY_DESCRIPTION || (mAccessibilityDescription.empty() && index == accessible->GetDescriptionPropertyIndex())) + if(mAccessibilityGetDescriptionSignal.Empty()) { - accessible->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::DESCRIPTION); + if(index == DevelControl::Property::ACCESSIBILITY_DESCRIPTION || (mAccessibilityDescription.empty() && index == accessible->GetDescriptionPropertyIndex())) + { + accessible->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::DESCRIPTION); + } } } } -- 2.7.4