[DatTools] Skip files with no name

This commit is contained in:
Matt Nadareski
2016-09-09 10:00:37 -07:00
parent c45d8b7025
commit 39d12de6e7

View File

@@ -1396,6 +1396,13 @@ namespace SabreTools.Helper
{
key = "";
// If there's no name in the rom, we log and skip it
if (String.IsNullOrEmpty(rom.Name))
{
logger.Warning("Rom with no name found! Skipping...");
return datdata;
}
// If we're in cleaning mode, sanitize the game name
rom.Machine.Name = (clean ? Style.CleanGameName(rom.Machine.Name) : rom.Machine.Name);