[NUI] check layout owner is null when removing childLayout (#1472)
[platform/core/csapi/tizenfx.git] / 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.