From 86439c2c2b307c2ae54c0ebe1898f3b096989ec2 Mon Sep 17 00:00:00 2001 From: Kirill Vainer Date: Fri, 11 Sep 2015 13:51:48 -0400 Subject: [PATCH] native bullet: fix JNI crash in ray / sweep test Method return type does not match call function return type --- jme3-bullet-native/src/native/cpp/jmeBulletUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jme3-bullet-native/src/native/cpp/jmeBulletUtil.cpp b/jme3-bullet-native/src/native/cpp/jmeBulletUtil.cpp index 04b56a545..a51bcf833 100644 --- a/jme3-bullet-native/src/native/cpp/jmeBulletUtil.cpp +++ b/jme3-bullet-native/src/native/cpp/jmeBulletUtil.cpp @@ -351,7 +351,7 @@ void jmeBulletUtil::addResult(JNIEnv* env, jobject resultlist, btVector3* hitnor env->SetFloatField(singleresult, jmeClasses::PhysicsRay_hitfraction, m_hitFraction); env->SetObjectField(singleresult, jmeClasses::PhysicsRay_collisionObject, up1->javaCollisionObject); - env->CallVoidMethod(resultlist, jmeClasses::PhysicsRay_addmethod, singleresult); + env->CallBooleanMethod(resultlist, jmeClasses::PhysicsRay_addmethod, singleresult); if (env->ExceptionCheck()) { env->Throw(env->ExceptionOccurred()); return; @@ -371,7 +371,7 @@ void jmeBulletUtil::addSweepResult(JNIEnv* env, jobject resultlist, btVector3* h env->SetFloatField(singleresult, jmeClasses::PhysicsSweep_hitfraction, m_hitFraction); env->SetObjectField(singleresult, jmeClasses::PhysicsSweep_collisionObject, up1->javaCollisionObject); - env->CallVoidMethod(resultlist, jmeClasses::PhysicsSweep_addmethod, singleresult); + env->CallBooleanMethod(resultlist, jmeClasses::PhysicsSweep_addmethod, singleresult); if (env->ExceptionCheck()) { env->Throw(env->ExceptionOccurred()); return;