[Tizen] fix crash: HasBody() null reference
authorminho.sun <minho.sun@samsung.com>
Mon, 14 Aug 2017 08:14:18 +0000 (17:14 +0900)
committerminho.sun <minho.sun@samsung.com>
Mon, 14 Aug 2017 08:14:21 +0000 (17:14 +0900)
This reverts commit 9aed662016c628f247082f9cba05fc9a92fa2cfe.

Change-Id: I05ff929cf9f95a283f9d4ee3149f8a523e887776

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;