From: dongsug.song Date: Mon, 24 Jul 2017 11:35:49 +0000 (+0900) Subject: [Tizen] fix crash: HasBody() null reference X-Git-Tag: preview1-00180^2~185 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b08bacd8d3ceea3d5ab4c4675c614ae769a4d243;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Tizen] fix crash: HasBody() null reference - when object is disposed but not set as null in C# side, native object of HasBody() gives null reference exception Change-Id: I0b99d583de4262bf95b06acbbfe2df2e2b742324 Signed-off-by: dongsug.song --- diff --git a/src/Tizen.NUI/src/public/BaseHandle.cs b/src/Tizen.NUI/src/public/BaseHandle.cs index e0d7ecc..130d455 100755 --- a/src/Tizen.NUI/src/public/BaseHandle.cs +++ b/src/Tizen.NUI/src/public/BaseHandle.cs @@ -307,6 +307,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; @@ -314,6 +319,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;