(A11y) Let we call DetachAccessibleObject only if it is Control 96/301396/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 15 Nov 2023 08:44:20 +0000 (17:44 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Sun, 19 Nov 2023 15:43:39 +0000 (00:43 +0900)
NUI.CustomView is subclass of NUI.View, and it will create CustomActor,
which is not a Dali::Toolkit::Control.

In this case, it will throw exception at DevelControl API.

To avoid this cases, let we seperate the cases between Control and non-Control.
And let we ignore for non-control cases.

Change-Id: I87082c77039bb6691cebb18d90341b61b511ba45
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-csharp-binder/common/nui-view-accessible.cpp

index af4d32d..49d5521 100644 (file)
@@ -733,12 +733,12 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_SetAccessibilityDelegate(c
   }));
 }
 
-SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_DetachAccessibleObject(Dali::Toolkit::Control* arg1_control)
+SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Accessibility_DetachAccessibleObject(Dali::BaseHandle* arg1_control)
 {
   GUARD_ON_NULL_RET(arg1_control);
 
   try_catch(([&]() {
-    Dali::Toolkit::Control control = *arg1_control;
+    Dali::Toolkit::Control control = Dali::Toolkit::Control::DownCast(*arg1_control);
     if(DALI_LIKELY(control))
     {
       // Call detach only if accessible was created before.