From 97aee48aafc8dfd0d97024b12a0fd939bde7314e Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 20 Nov 2016 20:31:34 -0800 Subject: [PATCH] Fix null string exception Empty line via datagrid = null --- pk3DS/Tools/TextFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pk3DS/Tools/TextFile.cs b/pk3DS/Tools/TextFile.cs index 0c02a6f..298332d 100644 --- a/pk3DS/Tools/TextFile.cs +++ b/pk3DS/Tools/TextFile.cs @@ -98,7 +98,7 @@ public string[] Lines int bytesUsed = 0; for (int i = 0; i < lines.Length; i++) { - string text = value[i].Trim(); // ReSharper disable once RedundantLogicalConditionalExpressionOperand + string text = (value[i] ?? "").Trim(); // ReSharper disable once RedundantLogicalConditionalExpressionOperand if (text.Length == 0 && SETEMPTYTEXT) text = $"[~ {i}]"; byte[] DecryptedLineData = getLineData(text);