Skip to content

Commit 2501dc3

Browse files
author
Jack Brookes
committed
fixed early exit bug
1 parent ed9cf21 commit 2501dc3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Assets/UXF/Scripts/FileIOManager.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,13 @@ public void WriteTrials(List<ResultsDictionary> dictList, WriteFileInfo writeFil
213213
// hashset keeps unique set of keys
214214
HashSet<string> headers = new HashSet<string>();
215215
foreach (ResultsDictionary dict in dictList)
216-
foreach (string key in dict.Keys)
217-
headers.Add(key);
216+
{
217+
if (dict != null)
218+
{
219+
foreach (string key in dict.Keys)
220+
headers.Add(key);
221+
}
222+
}
218223

219224
// final output: array of rows (comma-separated strings)
220225
string[] csvRows = new string[dictList.Count + 1];

0 commit comments

Comments
 (0)