[ArchiveTools] Add more null checks

This commit is contained in:
Matt Nadareski
2017-01-11 09:30:35 -08:00
parent f14e14d374
commit 58ff4dad83

View File

@@ -399,7 +399,13 @@ namespace SabreTools.Helper.Tools
List<Rom> roms = new List<Rom>();
string gamename = Path.GetFileNameWithoutExtension(input);
// First get the archive type
// First, we check that there is anything being passed as the input
if (String.IsNullOrEmpty(input))
{
return roms;
}
// Next, get the archive type
ArchiveType? at = GetCurrentArchiveType(input, logger);
// If we got back null, then it's not an archive, so we we return