[NUI] Fix Svace issues
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / EXaml / Block / GatherTypesBlock.cs
index 872c35e..0fe0255 100755 (executable)
@@ -23,12 +23,14 @@ namespace Tizen.NUI.EXaml
 {
     internal class GatherTypesBlock : Action
     {
-        public GatherTypesBlock(Action parent)
+        public GatherTypesBlock(GlobalDataList globalDataList, Action parent)
         {
             this.parent = parent;
+            this.globalDataList = globalDataList;
         }
 
         private Action parent;
+        private GlobalDataList globalDataList;
 
         public Action DealChar(char c)
         {
@@ -60,7 +62,7 @@ namespace Tizen.NUI.EXaml
 
         public void OnActive()
         {
-            LoadEXaml.Operations.Add(GatherType(childOp.ValueList));
+            globalDataList.Operations.Add(GatherType(childOp.ValueList));
             childOp = null;
         }
 
@@ -73,16 +75,18 @@ namespace Tizen.NUI.EXaml
             {
                 List<int> genericTypeIndexs = new List<int>();
                 var genericTypeIndexList = valueList[1] as List<object>;
-                foreach (var index in genericTypeIndexList)
+                if (genericTypeIndexList != null)
                 {
-                    genericTypeIndexs.Add((int)index);
+                    foreach (var index in genericTypeIndexList)
+                    {
+                        genericTypeIndexs.Add((int)index);
+                    }
                 }
-
-                return new GatherType(assemblyIndex, typeName, genericTypeIndexs);
+                return new GatherType(globalDataList, assemblyIndex, typeName, genericTypeIndexs);
             }
             else
             {
-                return new GatherType(assemblyIndex, typeName);
+                return new GatherType(globalDataList, assemblyIndex, typeName);
             }
         }
     }