From: huiyueun <35286162+huiyueun@users.noreply.github.com> Date: Thu, 1 Feb 2018 14:05:47 +0000 (+0900) Subject: [NUI] Fix TCT Crash issue, Parent crash (#108) X-Git-Tag: 4.0.1-preview1-00072~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aff3e5eb778cb5a9e3c394f44c895a4d7dadd514;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix TCT Crash issue, Parent crash (#108) Signed-off-by: huiyu,eun --- diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 7655247..4b3f3d8 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -1196,10 +1196,9 @@ namespace Tizen.NUI.BaseComponents private View ConvertIdToView(uint id) { View view = null; - - if (Parent is View) + if (GetParent() is View) { - View parentView = Parent as View; + View parentView = GetParent() as View; view = parentView.FindChildById(id); } @@ -4334,14 +4333,15 @@ namespace Tizen.NUI.BaseComponents if (basehandle is Layer) { ret = new View(cPtr, false); + NUILog.Error("This Parent property is deprecated, shoud do not be used"); } else { ret = basehandle as View; + NDalicPINVOKE.delete_BaseHandle(CPtr); + CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } - NDalicPINVOKE.delete_BaseHandle(CPtr); - CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();