[NUI] Fix not to make LinearLayout.CellPadding nullable
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 18 Jun 2021 11:18:29 +0000 (20:18 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 23 Jun 2021 08:25:09 +0000 (17:25 +0900)
LinearLayout.CellPadding is Size2D, so it is not nullable type.
Therefore, if null is assigned to LinearLayout.CellPadding, then it
returns Size2D(0, 0).

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

index 2b171b9..765ce99 100755 (executable)
@@ -115,6 +115,11 @@ namespace Tizen.NUI
         {
             get
             {
+                if (cellPadding == null)
+                {
+                    cellPadding = new Size2D(0, 0);
+                }
+
                 return cellPadding;
             }
             set