[NUI] Fix SVACE issues.
authorhuayong.xu <huayong.xu@samsung.com>
Thu, 20 Apr 2023 06:42:43 +0000 (14:42 +0800)
committerJoogabYun <40262755+JoogabYun@users.noreply.github.com>
Wed, 26 Apr 2023 07:07:45 +0000 (16:07 +0900)
src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs
src/Tizen.NUI.Components/Controls/RecyclerView/CollectionView.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs

index 1669518..8e43308 100755 (executable)
@@ -190,9 +190,9 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    if (AppBar != null)
+                    if (AppBar is var bar && bar != null)
                     {
-                        FocusManager.Instance.SetCurrentFocusView(AppBar.PassFocusableViewInsideIfNeeded());
+                        FocusManager.Instance.SetCurrentFocusView(bar.PassFocusableViewInsideIfNeeded());
                     }
                     else
                     {
index 4a566cb..52adc96 100755 (executable)
@@ -985,7 +985,11 @@ namespace Tizen.NUI.Components
                 return Header;
             }
 
-            if (index == InternalSource.Count - 1 && Footer != null)
+            var source = InternalSource;
+            if (source == null)
+                return null;
+
+            if (index == source.Count - 1 && Footer != null)
             {
                 Footer.Show();
                 return Footer;
@@ -993,14 +997,14 @@ namespace Tizen.NUI.Components
 
             if (isGrouped)
             {
-                var context = InternalSource.GetItem(index);
-                if (InternalSource.IsGroupHeader(index))
+                if (source.IsGroupHeader(index))
                 {
+                    var context = source.GetItem(index);
                     item = RealizeGroupHeader(index, context);
                 }
-                else if (InternalSource.IsGroupFooter(index))
+                else if (source.IsGroupFooter(index))
                 {
-
+                    var context = source.GetItem(index);
                     //group selection?
                     item = RealizeGroupFooter(index, context);
                 }
@@ -1011,7 +1015,7 @@ namespace Tizen.NUI.Components
                     {
                         throw new Exception("Item realize failed by Null content return.");
                     }
-                    item.ParentGroup = InternalSource.GetGroupParent(index);
+                    item.ParentGroup = source.GetGroupParent(index);
                 }
             }
             else
index 3cc633e..3980341 100755 (executable)
@@ -1536,9 +1536,12 @@ namespace Tizen.NUI.BaseComponents
             {
                 Vector3 temp = GetNaturalSize();
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
-
-                Size2D sz = new Size2D((int)temp.Width, (int)temp.Height);
-                temp.Dispose();
+                Size2D sz = null;
+                if (temp != null)
+                {
+                    sz = new Size2D((int)temp.Width, (int)temp.Height);
+                    temp.Dispose();
+                }
                 return sz;
             }
         }