From adffdb688f70efea1b60955a4c417cca69dc3ee2 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 9 May 2016 10:51:53 -0700 Subject: [PATCH] Nothing means no output --- DATabaseTwo/DATabaseTwo.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DATabaseTwo/DATabaseTwo.cs b/DATabaseTwo/DATabaseTwo.cs index 095e378f..9d489bf6 100644 --- a/DATabaseTwo/DATabaseTwo.cs +++ b/DATabaseTwo/DATabaseTwo.cs @@ -420,6 +420,13 @@ Make a selection: roms = RomManipulation.ParseDict(file, 0, tempSrcId, roms, _logger); } + // If the dictionary is empty for any reason, tell the user and exit + if (roms.Keys.Count == 0 || roms.Count == 0) + { + _logger.Log("No roms found for system ID " + systemid); + return; + } + // Now process all of the roms _logger.Log("Cleaning rom data"); List keys = roms.Keys.ToList();