# HG changeset patch # User moel.mich # Date 1273922450 0 # Node ID 03d3325e85d48c306327af3b9c96bf18eafc83be # Parent 69dfa910e628d49eb6b0db5f3193aa608864043e Fixed the following NullReferenceException: System.NullReferenceException: in OpenHardwareMonitor.Hardware.Nvidia.NvidiaGroup..ctor() in OpenHardwareMonitor.Hardware.Computer.Open() in OpenHardwareMonitor.GUI.MainForm..ctor() in OpenHardwareMonitor.Program.Main() diff -r 69dfa910e628 -r 03d3325e85d4 Hardware/Nvidia/NvidiaGroup.cs --- a/Hardware/Nvidia/NvidiaGroup.cs Sat May 15 11:09:02 2010 +0000 +++ b/Hardware/Nvidia/NvidiaGroup.cs Sat May 15 11:20:50 2010 +0000 @@ -55,7 +55,13 @@ NvPhysicalGpuHandle[] handles = new NvPhysicalGpuHandle[NVAPI.MAX_PHYSICAL_GPUS]; - + + if (NVAPI.NvAPI_EnumPhysicalGPUs == null) { + report.AppendLine("Error: NvAPI_EnumPhysicalGPUs not available"); + report.AppendLine(); + return; + } + int count; if (NVAPI.NvAPI_EnumPhysicalGPUs(handles, out count) != NvStatus.OK) return;