[NUI] Fix testhub NUI.Components coredump issue
authordongsug.song <dongsug.song@samsung.com>
Thu, 2 Sep 2021 12:20:36 +0000 (21:20 +0900)
committerhuiyu <35286162+huiyueun@users.noreply.github.com>
Tue, 7 Sep 2021 09:05:39 +0000 (18:05 +0900)
- there was no fail but coredumps are remained after finishing NUI.Components test.
- native crash occured when empty native object handle is accessed and the TouchEvent signal is tried to be gotten.
- https://code.sec.samsung.net/jira/browse/TSDF-2266

src/Tizen.NUI/src/public/BaseComponents/ViewAccessibility.cs

index b392206..7769e4d 100755 (executable)
@@ -559,6 +559,16 @@ namespace Tizen.NUI.BaseComponents
                 return;
             }
 
+            if (disposing == false)
+            {
+                if (SwigCPtr.Handle == IntPtr.Zero || SwigCMemOwn == false)
+                {
+                    // at this case, implicit nor explicit dispose is not required. No native object is made.
+                    disposed = true;
+                    return;
+                }
+            }
+
             if (disposing)
             {
                 Unparent();