REFACTOR: Possible 'System.InvalidOperationException'.

This commit is contained in:
2017-12-21 17:10:37 +00:00
parent e06c140e45
commit 13a6473236
5 changed files with 1964 additions and 1956 deletions

View File

@@ -67,7 +67,8 @@ namespace DiscImageChef.Core.Devices
switch(dev.Type)
{
case DeviceType.ATA:
if(Identify.Decode(identification).HasValue) ataId = Identify.Decode(identification).Value;
Identify.IdentifyDevice? ataIdNullable = Identify.Decode(identification);
if(ataIdNullable.HasValue) ataId = ataIdNullable.Value;
break;
case DeviceType.NVMe: throw new NotImplementedException("NVMe devices not yet supported.");
}