From 12d45dedc09239b1b5614c2678a998b8d70538c1 Mon Sep 17 00:00:00 2001 From: Bebul Date: Tue, 9 Dec 2014 10:04:44 +0100 Subject: [PATCH] Fix invalidateUpdateList not to use both cycle and recursion traverse --- jme3-core/src/main/java/com/jme3/scene/Node.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/scene/Node.java b/jme3-core/src/main/java/com/jme3/scene/Node.java index f085251bd..84ef6d0a3 100644 --- a/jme3-core/src/main/java/com/jme3/scene/Node.java +++ b/jme3-core/src/main/java/com/jme3/scene/Node.java @@ -199,15 +199,15 @@ public class Node extends Spatial implements Savable { } /** - * Called to invalide the root node's update list. This is + * Called to invalidate the root node's update list. This is * called whenever a spatial is attached/detached as well as * when a control is added/removed from a Spatial in a way * that would change state. */ void invalidateUpdateList() { updateListValid = false; - for( Node n = parent; n != null; n = n.getParent() ) { - n.invalidateUpdateList(); + if ( parent != null ) { + parent.invalidateUpdateList(); } }