diff options
author | Michael Bien <[email protected]> | 2011-01-22 04:55:05 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-01-22 04:55:05 +0100 |
commit | 3c3c59f0af028d3464e096c4861a872e1002adb6 (patch) | |
tree | 0616385fd1f62292d9be03c4cfac54c03c3946a9 /src | |
parent | 5941ad870810c3957d55750641e6424f91b4612f (diff) |
check for empty device list to prevent a INVALID_VALUE exception on apple's impl.
Diffstat (limited to 'src')
-rw-r--r-- | src/com/jogamp/opencl/CLPlatform.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/CLPlatform.java b/src/com/jogamp/opencl/CLPlatform.java index 323022e4..6658f006 100644 --- a/src/com/jogamp/opencl/CLPlatform.java +++ b/src/com/jogamp/opencl/CLPlatform.java @@ -268,7 +268,7 @@ public final class CLPlatform { int ret = cl.clGetDeviceIDs(ID, type.TYPE, 0, null, ib); // return an empty array rather than throwing an exception - if(ret == CL.CL_DEVICE_NOT_FOUND) { + if(ret == CL.CL_DEVICE_NOT_FOUND || ib.get(0) == 0) { continue; } |