Package: sysinfo / 0.7-8

07-nvidia_crash.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Index: sysinfo-0.7/Sysinfo/NvidiaInfo.cs
===================================================================
--- sysinfo-0.7.orig/Sysinfo/NvidiaInfo.cs	2008-12-29 18:27:23.000000000 +0000
+++ sysinfo-0.7/Sysinfo/NvidiaInfo.cs	2008-12-29 18:28:00.000000000 +0000
@@ -118,8 +118,11 @@
 				temp = proc1.StandardOutput.ReadLine();
 				temp = proc1.StandardOutput.ReadLine();
 	
-				temp = temp.Remove(0, temp.LastIndexOf(":") + 2);
-				nvidia_videoram = ( Double.Parse(temp) / 1024 ).ToString() + " MB";
+
+				if (temp != null) {
+				    temp = temp.Remove(0, temp.LastIndexOf(":") + 2);
+				    nvidia_videoram = ( Double.Parse(temp) / 1024 ).ToString() + " MB";
+				}
 				
 				proc1.Close();
 				
@@ -135,8 +138,10 @@
 				temp = proc2.StandardOutput.ReadLine();
 				temp = proc2.StandardOutput.ReadLine();
 	
-				temp = temp.Remove(0, temp.LastIndexOf(":") + 2);
-				nvidia_busrate = temp.Remove(temp.LastIndexOf("."), 1) + "x";
+				if (temp != null) {
+				    temp = temp.Remove(0, temp.LastIndexOf(":") + 2);
+ 				    nvidia_busrate = temp.Remove(temp.LastIndexOf("."), 1) + "x";
+ 				}
 				
 				proc2.Close();
 				
@@ -151,9 +156,11 @@
 				
 				temp = proc3.StandardOutput.ReadLine();
 				temp = proc3.StandardOutput.ReadLine();
-	
-				temp = temp.Remove(0, temp.LastIndexOf(":") + 2);
-				nvidia_gpu = temp.Remove(temp.LastIndexOf(","), 5) + " MHz";
+
+				if (temp != null) {
+				    temp = temp.Remove(0, temp.LastIndexOf(":") + 2);
+				    nvidia_gpu = temp.Remove(temp.LastIndexOf(","), 5) + " MHz";
+				}
 				
 				proc3.Close();