From 217eacde1ecd9e0230890cd729bd44b7ca774ea0 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Fri, 6 May 2011 18:02:19 +0000 Subject: [PATCH] - fix PhysicsSpace.removeAll() recursion bug (same fix as for addAll) Fixes Issue 349 git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7456 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/bullet/com/jme3/bullet/PhysicsSpace.java | 4 +--- engine/src/jbullet/com/jme3/bullet/PhysicsSpace.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/engine/src/bullet/com/jme3/bullet/PhysicsSpace.java b/engine/src/bullet/com/jme3/bullet/PhysicsSpace.java index 732f862fd..77d3f76a8 100644 --- a/engine/src/bullet/com/jme3/bullet/PhysicsSpace.java +++ b/engine/src/bullet/com/jme3/bullet/PhysicsSpace.java @@ -537,9 +537,7 @@ public class PhysicsSpace { List children = ((Node) spatial).getChildren(); for (Iterator it = children.iterator(); it.hasNext();) { Spatial spat = it.next(); - if (spat instanceof Node) { - removeAll((Node) spat); - } + removeAll((Node) spat); } } } diff --git a/engine/src/jbullet/com/jme3/bullet/PhysicsSpace.java b/engine/src/jbullet/com/jme3/bullet/PhysicsSpace.java index e4235ce8a..6e5aa110d 100644 --- a/engine/src/jbullet/com/jme3/bullet/PhysicsSpace.java +++ b/engine/src/jbullet/com/jme3/bullet/PhysicsSpace.java @@ -527,9 +527,7 @@ public class PhysicsSpace { List children = ((Node) spatial).getChildren(); for (Iterator it = children.iterator(); it.hasNext();) { Spatial spat = it.next(); - if (spat instanceof Node) { - removeAll((Node) spat); - } + removeAll((Node) spat); } } }