[DatFile] Add check for Write Dat as well

This commit is contained in:
Matt Nadareski
2016-09-20 23:43:54 -07:00
parent ca0e93e1ec
commit 3c67cfe37f

View File

@@ -3005,6 +3005,20 @@ namespace SabreTools.Helper
foreach (string key in keys) foreach (string key in keys)
{ {
// If the dictionary somehow doesn't have the key in question, continue
if (!sortable.ContainsKey(key))
{
logger.Warning("SortedDictionary does not contain key: " + key);
continue;
}
// If we somehow have a null list, just skip it
if (sortable[key] == null)
{
logger.Warning("Blank list found for key: " + key);
continue;
}
List<DatItem> roms = sortable[key]; List<DatItem> roms = sortable[key];
for (int index = 0; index < roms.Count; index++) for (int index = 0; index < roms.Count; index++)