diff options
| author | 2017-02-01 07:21:51 +0000 | |
|---|---|---|
| committer | 2017-02-01 07:21:51 +0000 | |
| commit | 820768f0341ec97fda392ce8fd9b34d78712d66d (patch) | |
| tree | cb087845d45cad88d27d13117ae1c49cdf2a6ff8 | |
| parent | ec61beaa7a92d4f203b03eada51c7485566d1aac (diff) | |
| parent | aea873ade0832d3f248f7416d0caa04662134cc7 (diff) | |
Merge "Fix a use-of-uninitialized-value warning" am: 53873df5fe
am: aea873ade0
Change-Id: I747d94158c8a1c77f8ae1076c93a3d22f6c22ef5
| -rw-r--r-- | core/jni/com_google_android_gles_jni_GLImpl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/jni/com_google_android_gles_jni_GLImpl.cpp b/core/jni/com_google_android_gles_jni_GLImpl.cpp index ad7d744cb693..3e74d1c855b3 100644 --- a/core/jni/com_google_android_gles_jni_GLImpl.cpp +++ b/core/jni/com_google_android_gles_jni_GLImpl.cpp @@ -132,6 +132,7 @@ getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *o pointer = _env->CallStaticLongMethod(nioAccessClass, getBasePointerID, buffer); if (pointer != 0L) { + *offset = 0; *array = NULL; return reinterpret_cast<void *>(pointer); } @@ -139,6 +140,7 @@ getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *o *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, getBaseArrayID, buffer); if (*array == NULL) { + *offset = 0; return (void*) NULL; } *offset = _env->CallStaticIntMethod(nioAccessClass, |