[NUI] Fix tct exception block issues
authordongsug.song <dongsug.song@samsung.com>
Tue, 28 Sep 2021 09:04:11 +0000 (18:04 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 28 Sep 2021 09:50:16 +0000 (18:50 +0900)
src/Tizen.NUI/src/public/BaseComponents/ViewAccessibility.cs
src/Tizen.NUI/src/public/Common/BaseHandle.cs

index 7769e4d..47e2793 100755 (executable)
@@ -561,7 +561,7 @@ namespace Tizen.NUI.BaseComponents
 
             if (disposing == false)
             {
-                if (SwigCPtr.Handle == IntPtr.Zero || SwigCMemOwn == false)
+                if (IsNativeHandleInvalid() || SwigCMemOwn == false)
                 {
                     // at this case, implicit nor explicit dispose is not required. No native object is made.
                     disposed = true;
index c0eb891..65e9844 100644 (file)
@@ -576,6 +576,11 @@ namespace Tizen.NUI
             }
         }
 
+        internal bool IsNativeHandleInvalid()
+        {
+            return swigCPtr.Handle == IntPtr.Zero;
+        }
+
         /// <summary>
         /// swigCMemOwn
         /// </summary>