summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebian CLI Applications Team <pkg-cli-apps-team@lists.alioth.debian.org>2017-05-24 21:06:47 +0100
committerAndreas Moog <andreas.moog@warperbbs.de>2017-05-24 21:06:47 +0100
commit02619d863337218191a2f68dea459dd6b0e88f33 (patch)
tree0321c96b05b9028dee61e9f39e9d1f18fbded3b6
parent456a6f9bac514de396aa73d4e2cbda8740cd8698 (diff)
nvidia_crash
=================================================================== Gbp-Pq: Name 07-nvidia_crash.diff
-rw-r--r--Sysinfo/NvidiaInfo.cs21
1 files changed, 14 insertions, 7 deletions
diff --git a/Sysinfo/NvidiaInfo.cs b/Sysinfo/NvidiaInfo.cs
index 7707ca6..e7c07fe 100644
--- a/Sysinfo/NvidiaInfo.cs
+++ b/Sysinfo/NvidiaInfo.cs
@@ -118,8 +118,11 @@ namespace Sysinfo {
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 @@ namespace Sysinfo {
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 @@ namespace Sysinfo {
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();