[NUI] Fix svace issues.
authorguowei.wang <guowei.wang@samsung.com>
Wed, 18 Jan 2023 03:42:48 +0000 (11:42 +0800)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 1 Feb 2023 07:07:33 +0000 (16:07 +0900)
src/Tizen.NUI.Components/Controls/Navigation/Navigator.cs
src/Tizen.NUI.Components/Controls/RecyclerView/Layouter/GridLayouter.cs

index d012093..94b58ad 100755 (executable)
@@ -155,13 +155,19 @@ namespace Tizen.NUI.Components
         private void OnAddedToWindow(object sender, EventArgs e)
         {
             parentWindow = Window.Get(this);
-            parentWindow.KeyEvent += OnWindowKeyEvent;
+            if (null != parentWindow)
+            {
+                parentWindow.KeyEvent += OnWindowKeyEvent;
+            }
         }
 
         private void OnRemovedFromWindow(object sender, EventArgs e)
         {
-            parentWindow.KeyEvent -= OnWindowKeyEvent;
-            parentWindow = null;
+            if (null != parentWindow)
+            {
+                parentWindow.KeyEvent -= OnWindowKeyEvent;
+                parentWindow = null;
+            }
         }
 
         private void Initialize()
index 67b126c..2c4d0a4 100755 (executable)
@@ -1445,9 +1445,10 @@ namespace Tizen.NUI.Components
                         ScrollContentSize - Padding.Bottom - footerSize + footerMargin.Top;
                 return (xPos, yPos);
             }
-            if (isGrouped)
+
+            GroupInfo myGroup = GetGroupInfo(index);
+            if (isGrouped && null != myGroup)
             {
-                GroupInfo myGroup = GetGroupInfo(index);
                 if (colView.InternalItemSource.IsGroupHeader(index))
                 {
                     spaceStartX+= groupHeaderMargin.Start;