mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Prevent trying to save null media tags, and report their presence to stderror.
This commit is contained in:
@@ -1612,6 +1612,13 @@ namespace DiscImageChef.DiscImages
|
||||
foreach(KeyValuePair<MediaTagType, byte[]> mediaTag in mediaTags)
|
||||
{
|
||||
DataType dataType = GetDataTypeForMediaTag(mediaTag.Key);
|
||||
|
||||
if(mediaTag.Value is null)
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Tag type {0} is null, skipping...", dataType);
|
||||
continue;
|
||||
}
|
||||
|
||||
idxEntry = new IndexEntry
|
||||
{
|
||||
blockType = BlockType.DataBlock, dataType = dataType, offset = (ulong)imageStream.Position
|
||||
|
||||
Reference in New Issue
Block a user