[NUI] Null check of Owner property of LayoutItem for Independent View. (#2416)
authorbshsqa <32317749+bshsqa@users.noreply.github.com>
Wed, 16 Dec 2020 05:52:10 +0000 (14:52 +0900)
committerGitHub <noreply@github.com>
Wed, 16 Dec 2020 05:52:10 +0000 (14:52 +0900)
- Current implementation, we didn't check whether the Owner Property is null or not in the Layout method.
 - This patch add null check of it to avoid null exception

Signed-off-by: Seungho Baek <sbsh.baek@samsung.com>
src/Tizen.NUI/src/public/Layouting/LayoutItem.cs

index 3133f44..97a63c1 100755 (executable)
@@ -242,7 +242,7 @@ namespace Tizen.NUI
         /// <since_tizen> 6 </since_tizen>
         public void Layout(LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
         {
-            Layout(left, top, right, bottom, Owner.ExcludeLayouting);
+            Layout(left, top, right, bottom, Owner?.ExcludeLayouting ?? false);
         }
 
         /// <summary>