Permalink
Browse files

native bullet: fix JNI crash in ray / sweep test

Method return type does not match call function return type
  • Loading branch information...
1 parent e9245a7 commit 86439c2c2b307c2ae54c0ebe1898f3b096989ec2 @shadowislord shadowislord committed Sep 11, 2015
Showing with 2 additions and 2 deletions.
  1. +2 −2 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;

0 comments on commit 86439c2

Please sign in to comment.