diff --git a/src/com/sheepit/client/hardware/gpu/GPU.java b/src/com/sheepit/client/hardware/gpu/GPU.java index 6f945e8..c5cf0fd 100644 --- a/src/com/sheepit/client/hardware/gpu/GPU.java +++ b/src/com/sheepit/client/hardware/gpu/GPU.java @@ -31,6 +31,8 @@ public class GPU { public static List devices = null; public static boolean generate() { + devices = new LinkedList(); + OS os = OS.getOS(); String path = os.getCUDALib(); if (path == null) { @@ -79,8 +81,6 @@ public class GPU { return false; } - devices = new LinkedList(); - for (int num = 0; num < count.getValue(); num++) { byte name[] = new byte[256]; @@ -107,9 +107,6 @@ public class GPU { if (devices == null) { generate(); } - if (devices == null) { - return null; - } List devs = new LinkedList(); for (GPUDevice dev : devices) { @@ -122,9 +119,6 @@ public class GPU { if (devices == null) { generate(); } - if (devices == null) { - return null; - } return devices; }