Prevent trying to save null media tags, and report their presence to stderror.

This commit is contained in:
2019-08-10 14:35:14 +01:00
parent 298ac5969f
commit 44c96f1c04
5 changed files with 29 additions and 4 deletions

View File

@@ -539,7 +539,7 @@ namespace DiscImageChef.Core.Devices.Dumping
sidecar = preSidecar;
}
if(dev.IsUsb)
if(dev.IsUsb && dev.UsbDescriptors != null)
{
dumpLog.WriteLine("Reading USB descriptors.");
UpdateStatus?.Invoke("Reading USB descriptors.");
@@ -559,7 +559,7 @@ namespace DiscImageChef.Core.Devices.Dumping
};
}
if(dev.IsPcmcia)
if(dev.IsPcmcia && dev.Cis != null)
{
dumpLog.WriteLine("Reading PCMCIA CIS.");
UpdateStatus?.Invoke("Reading PCMCIA CIS.");