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()
This commit is contained in:
Michael Möller
2010-05-15 11:20:50 +00:00
parent a1077bc442
commit 9b0113e6b0
+7 -1
View File
@@ -55,7 +55,13 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
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;