summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2007-06-03 19:25:07 +0000
committerKenneth Russel <[email protected]>2007-06-03 19:25:07 +0000
commitd4771326d15acb54276c393821e033a686f3687d (patch)
tree111879a908c36e9d94c7b6400aefe8bb7f3a40d9
parent9d26f595d02b048f82ceb082c48882196833296f (diff)
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
-rw-r--r--src/java/com/sun/gluegen/JavaMethodBindingEmitter.java2
1 files changed, 1 insertions, 1 deletions
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\");");