From 23476199313917a63f8a0ac190e6fdc99f0aad0e Mon Sep 17 00:00:00 2001 From: neostom432 <31119276+neostom432@users.noreply.github.com> Date: Wed, 18 Mar 2020 13:03:06 +0900 Subject: [PATCH] [NUI] check layout owner is null when removing childLayout (#1473) If layout owner is null, cannot remove owner from it's parent. Check owner is null. --- src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs b/src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs index fdc6b20..45cd082 100755 --- a/src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs +++ b/src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs @@ -104,9 +104,12 @@ namespace Tizen.NUI } else { - Interop.Actor.Actor_Remove(View.getCPtr(childLayout.Owner.Parent), View.getCPtr(childLayout.Owner)); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + if(childLayout.Owner != null) + { + Interop.Actor.Actor_Remove(View.getCPtr(childLayout.Owner.Parent), View.getCPtr(childLayout.Owner)); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } } // Reset condition for animation ready for next transition when required. -- 2.7.4