From: huayong.xu Date: Thu, 20 Apr 2023 06:42:43 +0000 (+0800) Subject: Fix SVACE issues. X-Git-Tag: accepted/tizen/7.0/unified/20230424.020520~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5795f5ff1943ae7ac9144a321c1c63bab6f5fb56;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Fix SVACE issues. --- diff --git a/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs b/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs index 1669518..8e43308 100755 --- a/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs +++ b/src/Tizen.NUI.Components/Controls/Navigation/ContentPage.cs @@ -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 { diff --git a/src/Tizen.NUI.Components/Controls/RecyclerView/CollectionView.cs b/src/Tizen.NUI.Components/Controls/RecyclerView/CollectionView.cs index 4a566cb..52adc96 100755 --- a/src/Tizen.NUI.Components/Controls/RecyclerView/CollectionView.cs +++ b/src/Tizen.NUI.Components/Controls/RecyclerView/CollectionView.cs @@ -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 diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 4cf775f..a831ade 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -1545,9 +1545,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; } }