mirror of
https://github.com/openhardwaremonitor/openhardwaremonitor
synced 2025-08-30 22:05:08 +00:00
Fixed a NullReferenceException in HDD.Update.
This commit is contained in:
@@ -94,7 +94,8 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
public void Update() {
|
||||
if (count == 0) {
|
||||
SMART.DriveAttribute[] attributes = SMART.ReadSmart(handle, drive);
|
||||
temperature.Value = attributes[attribute].RawValue[0];
|
||||
if (attributes != null && attribute < attributes.Length)
|
||||
temperature.Value = attributes[attribute].RawValue[0];
|
||||
} else {
|
||||
temperature.Value = temperature.Value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user