diff --git a/engine/src/bullet/native/jmePhysicsSpace.cpp b/engine/src/bullet/native/jmePhysicsSpace.cpp index 634f7f379..e3e566d4c 100644 --- a/engine/src/bullet/native/jmePhysicsSpace.cpp +++ b/engine/src/bullet/native/jmePhysicsSpace.cpp @@ -49,7 +49,11 @@ jmePhysicsSpace::jmePhysicsSpace(JNIEnv* env, jobject javaSpace) { } void jmePhysicsSpace::attachThread() { - vm->AttachCurrentThread((void **) &env, NULL); +#ifdef JNI_VERSION_1_2 + vm->AttachCurrentThread((void**) &env, NULL); +#else + vm->AttachCurrentThread(vm, &env, NULL); +#endif } JNIEnv* jmePhysicsSpace::getEnv() {