Skip to content

Commit

Permalink
JNI Crash fix (apache#1357)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dayananda-V authored and tqchen committed Jun 30, 2018
1 parent 32a55f8 commit 60b874e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jvm/native/src/main/native/ml_dmlc_tvm_native_c_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ JNIEXPORT jint JNICALL Java_ml_dmlc_tvm_LibInfo_tvmArrayGetShape(
jmethodID arrayAppend = env->GetMethodID(arrayClass, "add", "(Ljava/lang/Object;)Z");
for (int i = 0; i < ndim; ++i) {
jobject data = env->NewObject(longClass, newLong, static_cast<jlong>(shape[i]));
env->CallObjectMethod(jshape, arrayAppend, data);
env->CallBooleanMethod(jshape, arrayAppend, data);
env->DeleteLocalRef(data);
}
env->DeleteLocalRef(longClass);
Expand Down

0 comments on commit 60b874e

Please sign in to comment.