From: huiyu,eun Date: Thu, 1 Feb 2018 13:58:26 +0000 (+0900) Subject: [NUI] Fix TCT Crash issue, Parent crash X-Git-Tag: submit/tizen_4.0/20180205.091435~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F168993%2F1;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix TCT Crash issue, Parent crash Change-Id: I60b03f0b92abd4e0c80abd755d94f2d846241948 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 765524769..4b3f3d833 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();