소스 검색

- fix ragdoll listeners being looped when no listener list exists

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8143 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 14 년 전
부모
커밋
93326d1285
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      engine/src/jbullet/com/jme3/bullet/control/KinematicRagdollControl.java

+ 1 - 1
engine/src/jbullet/com/jme3/bullet/control/KinematicRagdollControl.java

@@ -660,7 +660,7 @@ public class KinematicRagdollControl implements PhysicsControl, PhysicsCollision
         }
 
         //dispatching the event if the ragdoll has been hit
-        if (hit) {
+        if (hit && listeners != null) {
             for (RagdollCollisionListener listener : listeners) {
                 listener.collide(hitBone, hitObject, event);
             }