Null checking in SSC dump.

This commit is contained in:
2019-05-01 00:20:28 +01:00
parent b887ae23a0
commit 7e602826c4

View File

@@ -263,7 +263,7 @@ namespace DiscImageChef.Core.Devices.Dumping
scsiMediumTypeTape = (byte)decMode.Value.Header.MediumType;
if(decMode.Value.Header.BlockDescriptors != null && decMode.Value.Header.BlockDescriptors.Length >= 1)
scsiDensityCodeTape = (byte)decMode.Value.Header.BlockDescriptors[0].Density;
blockSize = decMode.Value.Header.BlockDescriptors[0].BlockLength;
blockSize = decMode.Value.Header.BlockDescriptors != null ? decMode.Value.Header.BlockDescriptors[0].BlockLength : (uint)0;
UpdateStatus?.Invoke($"Device reports {blocks} blocks ({blocks * blockSize} bytes).");
}