* [NUI] Add defense code for BaseHandle
vd kona -
DF200925-00594
Check if the swigCptr value is correct after the dispose.
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
* Update BaseHandle.cs
* Update BaseHandle.cs
/// <since_tizen> 3 </since_tizen>
public bool HasBody()
{
- if (disposed == true)
+ if (swigCPtrCopy.Handle == IntPtr.Zero)
{
+ global::System.Diagnostics.StackTrace trace = new global::System.Diagnostics.StackTrace();
+ Tizen.Log.Error("NUI", "" + trace);
+ Tizen.Log.Error("NUI", "[ERROR] the native handle is invalid!");
return false;
}
+ if (disposed == true)
+ {
+ return false;
+ }
bool ret = Interop.BaseHandle.BaseHandle_HasBody(swigCPtrCopy);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;