[NUI] Fix build warning CA1062 (#2234)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / ItemIdContainer.cs
index 33ac295..b7e47bd 100755 (executable)
@@ -196,7 +196,7 @@ namespace Tizen.NUI
                 collectionRef = collection;
                 currentIndex = -1;
                 currentObject = null;
-                currentSize = collectionRef.Count;
+                currentSize = collectionRef?.Count ?? 0;
             }
 
             // Type-safe iterator Current