Ver Fonte

Fixed NPE in KinematicRagdollControl when removing the ragdoll from the scene (thanks Teique)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7538 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om há 14 anos atrás
pai
commit
5491f0b749

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

@@ -586,8 +586,8 @@ public class KinematicRagdollControl implements PhysicsControl, PhysicsCollision
             }
             this.space = space;
             addToPhysicsSpace();
+            this.space.addCollisionListener(this);
         }
-        this.space.addCollisionListener(this);
     }
 
     /**