don't crash if we get passed a NULL filename

This commit is contained in:
Michael Becker 2019-11-15 12:13:16 -05:00
parent cdd181bf70
commit 033ab67b5b
No known key found for this signature in database
GPG Key ID: 389DFF5D73781A12

View File

@ -227,6 +227,7 @@ namespace UniversalEditor.ObjectModels.FileSystem
/// <returns></returns>
public File AddFile(string name, byte[] fileData = null)
{
if (name == null) name = String.Empty;
string[] path = name.Split(mvarPathSeparators, StringSplitOptions.None);
Folder parent = null;
for (int i = 0; i < path.Length - 1; i++)