Fixed a NullReferenceException in the HDD SMART code.
This commit is contained in:
+1
-1
@@ -126,7 +126,7 @@ namespace OpenHardwareMonitor.GUI {
|
||||
minMenuItem.Checked = Utilities.Config.Get(minMenuItem.Name, false);
|
||||
maxMenuItem.Checked = Utilities.Config.Get(maxMenuItem.Name, true);
|
||||
limitMenuItem.Checked = Utilities.Config.Get(limitMenuItem.Name, false);
|
||||
hddMenuItem.Checked = Utilities.Config.Get(hddMenuItem.Name, false);
|
||||
hddMenuItem.Checked = Utilities.Config.Get(hddMenuItem.Name, true);
|
||||
|
||||
voltMenuItem.Checked = Utilities.Config.Get(voltMenuItem.Name, true);
|
||||
clocksMenuItem.Checked = Utilities.Config.Get(clocksMenuItem.Name, true);
|
||||
|
||||
@@ -60,9 +60,12 @@ namespace OpenHardwareMonitor.Hardware.HDD {
|
||||
string name = SMART.ReadName(handle, drive);
|
||||
if (name != null) {
|
||||
|
||||
SMART.DriveAttribute[] attributes =
|
||||
SMART.DriveAttribute[] attributes =
|
||||
SMART.ReadSmart(handle, drive);
|
||||
|
||||
if (attributes == null)
|
||||
continue;
|
||||
|
||||
int attribute = -1;
|
||||
for (int i = 0; i < attributes.Length; i++) {
|
||||
if (attributes[i].ID == SMART.AttributeID.Temperature) {
|
||||
|
||||
Reference in New Issue
Block a user