Fixed a few more crash causing bugs.

This commit is contained in:
Michael Möller
2010-04-26 19:22:42 +00:00
parent 540d615641
commit 160f0bd783
3 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ namespace OpenHardwareMonitor.GUI {
ITaskFolder folder = scheduler.GetFolder("\\Open Hardware Monitor");
IRegisteredTask task = folder.GetTask("Startup");
startup = task != null;
} catch (FileNotFoundException) {
} catch (IOException) {
startup = false;
}
} else {
+4 -3
View File
@@ -114,8 +114,7 @@ namespace OpenHardwareMonitor.Hardware.CPU {
CPUID[][] coreThreads = GroupThreadsByCore(threads);
this.threads[index] = coreThreads;
index++;
this.threads[index] = coreThreads;
switch (threads[0].Vendor) {
case Vendor.Intel:
@@ -134,7 +133,9 @@ namespace OpenHardwareMonitor.Hardware.CPU {
} break;
default:
break;
}
}
index++;
}
}
+5 -1
View File
@@ -196,7 +196,11 @@ namespace OpenHardwareMonitor.Hardware.Nvidia {
public static NvStatus NvAPI_GPU_GetFullName(NvPhysicalGpuHandle gpuHandle,
out string name) {
StringBuilder builder = new StringBuilder(SHORT_STRING_MAX);
NvStatus status = _NvAPI_GPU_GetFullName(gpuHandle, builder);
NvStatus status;
if (_NvAPI_GPU_GetFullName != null)
status = _NvAPI_GPU_GetFullName(gpuHandle, builder);
else
status = NvStatus.FUNCTION_NOT_FOUND;
name = builder.ToString();
return status;
}