turning list into array #1716

This commit is contained in:
Nicholas Hallahan
2015-07-16 07:50:30 -07:00
parent 8589cee9e2
commit 61cfcdb33b

View File

@@ -511,6 +511,19 @@ jlong JNICALL nativeAddPolyline(JNIEnv *env, jobject obj, jlong nativeMapViewPtr
return -1;
}
jobjectArray array =
reinterpret_cast<jobjectArray>(env->CallObjectMethod(points, listToArrayId));
if (env->ExceptionCheck() || (array == nullptr)) {
env->ExceptionDescribe();
return -1;
}
jsize len = env->GetArrayLength(array);
if (len < 0) {
env->ExceptionDescribe();
return -1;
}
return (jlong)width;
}