[Tizen] fix crash: HasBody() null reference
authordongsug.song <dongsug.song@samsung.com>
Tue, 25 Jul 2017 02:08:23 +0000 (11:08 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Tue, 25 Jul 2017 02:08:27 +0000 (11:08 +0900)
This reverts commit c44f992caf76e9c5b52ac80603525303dda4b16c.

Change-Id: I460d5ea306bc214feda75d777c1688ffef04968f

src/Tizen.NUI/src/public/BaseHandle.cs

index 3088fb7..0f03701 100755 (executable)
@@ -324,6 +324,11 @@ namespace Tizen.NUI
 
         public bool HasBody()
         {
+            if (disposed == true)
+            {
+                return false;
+            }
+
             bool ret = NDalicPINVOKE.BaseHandle_HasBody(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -331,6 +336,11 @@ namespace Tizen.NUI
 
         public bool IsEqual(BaseHandle rhs)
         {
+            if (disposed == true)
+            {
+                return false;
+            }
+
             bool ret = NDalicPINVOKE.BaseHandle_IsEqual(swigCPtr, BaseHandle.getCPtr(rhs));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;