[NUI][SVACE] Fix SVACE issues
authorguowei.wang <guowei.wang@samsung.com>
Tue, 15 Mar 2022 06:39:25 +0000 (14:39 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 15 Mar 2022 08:03:22 +0000 (17:03 +0900)
src/Tizen.NUI.Components/Controls/RecyclerView/Layouter/GridLayouter.cs
src/Tizen.NUI.Wearable/src/public/CircularPagination.cs
src/Tizen.NUI/src/public/Layouting/FlexLayout.cs
src/Tizen.NUI/src/public/Layouting/GridLayout.cs

index 453c574..43f24ad 100755 (executable)
@@ -310,18 +310,24 @@ namespace Tizen.NUI.Components
                         else if (source.IsGroupFooter(i))
                         {
                             //currentGroup.hasFooter = true;
-                            currentGroup.Count++;
-                            currentGroup.GroupSize += groupFooterSize;
-                            Current += groupFooterSize;
+                            if (currentGroup != null)
+                            {
+                                currentGroup.Count++;
+                                currentGroup.GroupSize += groupFooterSize;
+                                Current += groupFooterSize;
+                            }
                         }
                         else
                         {
-                            currentGroup.Count++;
-                            int index = i - currentGroup.StartIndex - ((colView.GroupHeaderTemplate != null)? 1: 0);
-                            if ((index % spanSize) == 0)
+                            if (currentGroup != null)
                             {
-                                currentGroup.GroupSize += StepCandidate;
-                                Current += StepCandidate;
+                                currentGroup.Count++;
+                                int index = i - currentGroup.StartIndex - ((colView.GroupHeaderTemplate != null) ? 1 : 0);
+                                if ((index % spanSize) == 0)
+                                {
+                                    currentGroup.GroupSize += StepCandidate;
+                                    Current += StepCandidate;
+                                }
                             }
                         }
                     }
index d8018dd..4c9158b 100755 (executable)
@@ -709,7 +709,7 @@ namespace Tizen.NUI.Wearable
                     // If the center image is set before, then should update the center visual separately.
                     if (isCurrentIndicatorCentered)
                     {
-                        indicator.URL = circularPaginationStyle.CenterIndicatorImageURL.Selected;
+                        indicator.URL = circularPaginationStyle.CenterIndicatorImageURL?.Selected;
                     }
                     else
                     {
@@ -722,7 +722,7 @@ namespace Tizen.NUI.Wearable
                     // If the center image is set before, then should update the center visual separately.
                     if (isCurrentIndicatorCentered)
                     {
-                        indicator.URL = circularPaginationStyle.CenterIndicatorImageURL.Normal;
+                        indicator.URL = circularPaginationStyle.CenterIndicatorImageURL?.Normal;
                     }
                     else
                     {
@@ -774,7 +774,7 @@ namespace Tizen.NUI.Wearable
 
                 if (isCenterImageSet && !isSymmetrical && (i == leftIndicatorCount))
                 {
-                    newOne.URL = circularPaginationStyle.CenterIndicatorImageURL.Normal;
+                    newOne.URL = circularPaginationStyle.CenterIndicatorImageURL?.Normal;
                 }
                 else
                 {
@@ -793,7 +793,7 @@ namespace Tizen.NUI.Wearable
 
             if (isCenterImageSet && (selectedIndex == leftIndicatorCount))
             {
-                indicatorList[selectedIndex].URL = circularPaginationStyle.CenterIndicatorImageURL.Selected;
+                indicatorList[selectedIndex].URL = circularPaginationStyle.CenterIndicatorImageURL?.Selected;
                 indicatorList[selectedIndex].Opacity = 1.0f;
             }
             else
index 3fe2c18..1096e1f 100755 (executable)
@@ -672,8 +672,8 @@ namespace Tizen.NUI
 
             childLayout?.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
 
-            measureSize.width = childLayout.MeasuredWidth.Size.AsRoundedValue();
-            measureSize.height = childLayout.MeasuredHeight.Size.AsRoundedValue();
+            measureSize.width = (childLayout == null) ? 0 : MeasuredWidth.Size.AsRoundedValue();
+            measureSize.height = (childLayout == null) ? 0 : MeasuredHeight.Size.AsRoundedValue();
         }
 
         void InsertChild(LayoutItem child)
index 48c4a3c..87a2290 100755 (executable)
@@ -371,7 +371,7 @@ namespace Tizen.NUI
             }
             else
             {
-                if (hLocations.Length > maxColumnConut)
+                if (hLocations?.Length > maxColumnConut)
                 {
                     widthSize = (int)(hLocations[maxColumnConut] - hLocations[0] - columnSpacing);
                 }