New bindings generated by glgen
Fixes crash of methods when NULL was used as a
(valid) parameter for a nio.buffer argument.
Bug: 6845189
Change-Id: Iae379d607bbca15d6d23e74e852f94c7f68637f9
diff --git a/core/jni/android_opengl_GLES10.cpp b/core/jni/android_opengl_GLES10.cpp
index d8a15df..571f579 100644
--- a/core/jni/android_opengl_GLES10.cpp
+++ b/core/jni/android_opengl_GLES10.cpp
@@ -3679,7 +3679,7 @@
if (pixels_buf) {
pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
}
- if (pixels == NULL) {
+ if (pixels_buf && pixels == NULL) {
char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
}
@@ -3733,7 +3733,7 @@
if (pixels_buf) {
pixels = (GLvoid *)getPointer(_env, pixels_buf, &_array, &_remaining, &_bufferOffset);
}
- if (pixels == NULL) {
+ if (pixels_buf && pixels == NULL) {
char * _pixelsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0);
pixels = (GLvoid *) (_pixelsBase + _bufferOffset);
}