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();