From 949d67f2886e49f55e5dd43558261b89acf59eb4 Mon Sep 17 00:00:00 2001 From: Evan Dixon Date: Sat, 10 Dec 2016 14:44:35 -0600 Subject: [PATCH] Fixed exception when FilePatcherJson.Dependencies is null --- DS ROM Patcher/FilePatcher.vb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DS ROM Patcher/FilePatcher.vb b/DS ROM Patcher/FilePatcher.vb index 3673352..7e34fc5 100644 --- a/DS ROM Patcher/FilePatcher.vb +++ b/DS ROM Patcher/FilePatcher.vb @@ -65,7 +65,13 @@ Public Class FilePatcher End Function Public Sub CopyToolsToDirectory(newToolsDir As String) - For Each item In SerializableInfo.Dependencies.Concat({SerializableInfo.CreatePatchProgram, SerializableInfo.ApplyPatchProgram}).Distinct + Dim tools As New List(Of String) + If SerializableInfo.Dependencies IsNot Nothing + tools.AddRange(SerializableInfo.Dependencies) + End If + tools.Add(SerializableInfo.CreatePatchProgram) + tools.Add(SerializableInfo.ApplyPatchProgram) + For Each item In tools.Distinct Dim source As String = Path.Combine(ToolsDirectory, item) Dim dest As String = Path.Combine(newToolsDir, item)