L3tum / HardwareInformation

.NET Standard Cross-Platform Hardware Information Gatherer
MIT License
56 stars 11 forks source link

Disk query fails in the presence of empty USB-SATA adapters #31

Closed NickHarmer closed 1 year ago

NickHarmer commented 3 years ago

If you have a USB-SATA dock attached but there are no disks inserted, the code will not return any disks at all, because WMI returns the Size field for the device as NULL, which causes an exception.