From d4771326d15acb54276c393821e033a686f3687d Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sun, 3 Jun 2007 19:25:07 +0000 Subject: More robust code for direct / indirect buffer checking git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/trunk@61 a78bb65f-1512-4460-ba86-f6dc96a7bf27 --- src/java/com/sun/gluegen/JavaMethodBindingEmitter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/java/com/sun') diff --git a/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java b/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java index 3cbafc0..08da5d5 100644 --- a/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java +++ b/src/java/com/sun/gluegen/JavaMethodBindingEmitter.java @@ -412,7 +412,7 @@ public class JavaMethodBindingEmitter extends FunctionEmitter firstBuffer = false; writer.println(" boolean _direct = BufferFactory.isDirect(" + getArgumentName(i) + ");"); } else { - writer.println(" if (_direct != BufferFactory.isDirect(" + getArgumentName(i) + "))"); + writer.println(" if (" + getArgumentName(i) + " != null && _direct != BufferFactory.isDirect(" + getArgumentName(i) + "))"); writer.println(" throw new " + getRuntimeExceptionType() + "(\"Argument \\\"" + getArgumentName(i) + "\\\" : Buffers passed to this method must all be either direct or indirect\");"); -- cgit v1.2.3