[Tizen] fix crash: HasBody() null reference 23/141723/1
authorminho.sun <minho.sun@samsung.com>
Tue, 1 Aug 2017 01:39:48 +0000 (10:39 +0900)
committerminho.sun <minho.sun@samsung.com>
Tue, 1 Aug 2017 01:39:57 +0000 (10:39 +0900)
This reverts commit ee083226678777e35d07e41c031be3c59208d8c4.

Change-Id: Ic2fb645767853f4b9cad23af67e1a6583f04294d

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;