[NUI] fix svace issue. check Selected item existance.
authorEverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Fri, 17 Mar 2023 05:57:37 +0000 (14:57 +0900)
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>
Wed, 29 Mar 2023 05:40:29 +0000 (14:40 +0900)
src/Tizen.NUI.Components/Controls/RecyclerView/Item/RecyclerViewItem.cs

index a9fa9c6..a31686e 100755 (executable)
@@ -68,14 +68,17 @@ namespace Tizen.NUI.Components
                         else if (collectionView.SelectionMode is ItemSelectionMode.Multiple)
                         {
                             var selectedList = collectionView.SelectedItems;
-                            bool contains = selectedList.Contains(context);
-                            if (newSelected && !contains)
+                            if (selectedList != null)
                             {
-                                selectedList.Add(context);
-                            }
-                            else if (!newSelected && contains)
-                            {
-                                selectedList.Remove(context);
+                                bool contains = selectedList.Contains(context);
+                                if (newSelected && !contains)
+                                {
+                                    selectedList.Add(context);
+                                }
+                                else if (!newSelected && contains)
+                                {
+                                    selectedList.Remove(context);
+                                }
                             }
                         }
                     }