summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLBuffer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/mbien/opencl/CLBuffer.java')
-rw-r--r--src/com/mbien/opencl/CLBuffer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/mbien/opencl/CLBuffer.java b/src/com/mbien/opencl/CLBuffer.java
index 618cfa96..e42b9064 100644
--- a/src/com/mbien/opencl/CLBuffer.java
+++ b/src/com/mbien/opencl/CLBuffer.java
@@ -21,7 +21,7 @@ public final class CLBuffer<B extends Buffer> extends CLMemory<B> {
static <B extends Buffer> CLBuffer<B> create(CLContext context, B directBuffer, int flags, int glBuffer) {
- if(!directBuffer.isDirect())
+ if(directBuffer != null && !directBuffer.isDirect())
throw new IllegalArgumentException("buffer is not a direct buffer");
CL cl = context.cl;