Commits

Anonymous committed a6f528c

fix null check bug in SosController.FilterTypes

  • Participants
  • Parent commits e1859c4

Comments (0)

Files changed (1)

File SosController.cs

 
         public ListViewItem[] FilterTypes(string typeName)
         {
-            return
-                this.types.Where(i => i.SubItems[3].Text.IndexOf(typeName, StringComparison.OrdinalIgnoreCase) != -1).
-                    ToArray();
+        	var typestofilterover = this.types ?? new ListViewItem[] {};
+        	Func<ListViewItem, bool> filteringPredicate =
+        		(item) =>
+        		item.SubItems[3].Text.IndexOf(typeName, StringComparison.OrdinalIgnoreCase) != -1;
+          return typestofilterover.Where(filteringPredicate).ToArray();
         }
 
         public ObjectInfo GetInstanceDumpDetails(string instanceAddress)