diff --git a/LibreHardwareMonitorLib/Hardware/SMBios.cs b/LibreHardwareMonitorLib/Hardware/SMBios.cs index b292c09..9571668 100644 --- a/LibreHardwareMonitorLib/Hardware/SMBios.cs +++ b/LibreHardwareMonitorLib/Hardware/SMBios.cs @@ -1185,6 +1185,7 @@ public class SMBios Bios = new BiosInformation(biosVendor, biosVersion, biosDate); MemoryDevices = Array.Empty(); + ProcessorCaches = Array.Empty(); } else { @@ -1474,13 +1475,16 @@ public class SMBios } } - for (int i = 0; i < ProcessorCaches.Length; i++) + if (ProcessorCaches != null) { - r.Append("Cache [" + ProcessorCaches[i].Designation + "] Size: "); - r.AppendLine(ProcessorCaches[i].Size.ToString()); - r.Append("Cache [" + ProcessorCaches[i].Designation + "] Associativity: "); - r.AppendLine(ProcessorCaches[i].Associativity.ToString().Replace("_", string.Empty)); - r.AppendLine(); + foreach (CacheInformation processorCaches in ProcessorCaches) + { + r.Append("Cache [" + processorCaches.Designation + "] Size: "); + r.AppendLine(processorCaches.Size.ToString()); + r.Append("Cache [" + processorCaches.Designation + "] Associativity: "); + r.AppendLine(processorCaches.Associativity.ToString().Replace("_", string.Empty)); + r.AppendLine(); + } } for (int i = 0; i < MemoryDevices.Length; i++)