[NUI] Fix svace issue
authorzhouleonlei <zhouleon.lei@samsung.com>
Tue, 11 Jan 2022 09:19:26 +0000 (17:19 +0800)
committerSeoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com>
Wed, 12 Jan 2022 08:40:18 +0000 (17:40 +0900)
src/Tizen.NUI.Components/Controls/RecyclerView/Layouter/LinearLayouter.cs
src/Tizen.NUI/src/public/Common/Container.cs

index b6234a4..3bf3282 100755 (executable)
@@ -309,19 +309,25 @@ namespace Tizen.NUI.Components
                         else if (source.IsGroupFooter(i))
                         {
                             //currentGroup.hasFooter = true;
-                            currentGroup.Count++;
-                            currentGroup.GroupSize += groupFooterSize;
-                            if (colView.SizingStrategy == ItemSizingStrategy.MeasureAll)
-                                currentGroup.ItemPosition.Add(Current - currentGroup.GroupPosition);
-                            Current += groupFooterSize;
+                            if (currentGroup != null)
+                            {
+                                currentGroup.Count++;
+                                currentGroup.GroupSize += groupFooterSize;
+                                if (colView.SizingStrategy == ItemSizingStrategy.MeasureAll)
+                                    currentGroup.ItemPosition.Add(Current - currentGroup.GroupPosition);
+                                Current += groupFooterSize;
+                            }
                         }
                         else
                         {
-                            currentGroup.Count++;
-                            currentGroup.GroupSize += StepCandidate;
-                            if (colView.SizingStrategy == ItemSizingStrategy.MeasureAll)
-                                currentGroup.ItemPosition.Add(Current - currentGroup.GroupPosition);
-                            Current += StepCandidate;
+                            if (currentGroup != null)
+                            {
+                                currentGroup.Count++;
+                                currentGroup.GroupSize += StepCandidate;
+                                if (colView.SizingStrategy == ItemSizingStrategy.MeasureAll)
+                                    currentGroup.ItemPosition.Add(Current - currentGroup.GroupPosition);
+                                Current += StepCandidate;
+                            }
                         }
                     }
                 }
index b173715..2554cfd 100755 (executable)
@@ -106,7 +106,7 @@ namespace Tizen.NUI
                 return;
             }
 
-            var xNameToElementsOfOther = nameScopeOfOther.NameToElement;
+            var xNameToElementsOfOther = nameScopeOfOther?.NameToElement;
             var xNameToElements = nameScope.NameToElement;
 
             if (null != xNameToElements)