[DatTools] Add lock to adding rom

The idea is that this will help in the future to make Parsing go quicker
This commit is contained in:
Matt Nadareski
2016-09-08 21:48:50 -07:00
parent 21e06108a3
commit c45d8b7025

View File

@@ -1452,6 +1452,8 @@ namespace SabreTools.Helper
rom.HashData.Size = -1;
}
lock (datdata.Files)
{
key = rom.HashData.Size + "-" + rom.HashData.CRC;
if (datdata.Files.ContainsKey(key))
{
@@ -1473,6 +1475,7 @@ namespace SabreTools.Helper
datdata.SHA1Count += (String.IsNullOrEmpty(rom.HashData.SHA1) ? 0 : 1);
datdata.NodumpCount += (rom.Nodump ? 1 : 0);
}
}
return datdata;
}