VOID_DataLogger: Add a null gate in CloseFileIfOpen.
[VOID.git] / VOID_DataLogger.cs
blob:a/VOID_DataLogger.cs -> blob:b/VOID_DataLogger.cs
--- a/VOID_DataLogger.cs
+++ b/VOID_DataLogger.cs
@@ -425,7 +425,7 @@
 
 			logger.AppendFormat("Cleaning up file {0}...", this.fileName);
 
-			if (this.csvBytes.Count > 0)
+			if (this.csvBytes != null && this.csvBytes.Count > 0)
 			{
 				logger.Append(" Writing remaining data...");
 				this.AsyncWriteData();