Merge "Fix a use-of-uninitialized-value warning"
am: 53873df5fe
Change-Id: I102fb345244f922cb41a5ce31b2de0af8e68bf97
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user