[NUI] check layout owner is null when removing childLayout (#1473)
authorneostom432 <31119276+neostom432@users.noreply.github.com>
Wed, 18 Mar 2020 04:03:06 +0000 (13:03 +0900)
committerGitHub <noreply@github.com>
Wed, 18 Mar 2020 04:03:06 +0000 (13:03 +0900)
If layout owner is null, cannot remove owner from it's parent.
Check owner is null.

src/Tizen.NUI/src/public/Layouting/LayoutGroup.cs

index fdc6b20..45cd082 100755 (executable)
@@ -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.