From 39d12de6e7f09751cdf4bae005c8e5a79d6486da Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 9 Sep 2016 10:00:37 -0700 Subject: [PATCH] [DatTools] Skip files with no name --- SabreTools.Helper/Tools/DatTools.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SabreTools.Helper/Tools/DatTools.cs b/SabreTools.Helper/Tools/DatTools.cs index 62b53cb3..87c6dcd1 100644 --- a/SabreTools.Helper/Tools/DatTools.cs +++ b/SabreTools.Helper/Tools/DatTools.cs @@ -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);