diff --git a/extensions/ccui/base-classes/CCProtectedNode.js b/extensions/ccui/base-classes/CCProtectedNode.js index 1925572fa5..1dc6e9a6e0 100644 --- a/extensions/ccui/base-classes/CCProtectedNode.js +++ b/extensions/ccui/base-classes/CCProtectedNode.js @@ -90,15 +90,15 @@ cc.ProtectedNode = cc.Node.extend(/** @lends cc.ProtectedNode# */{ renderer.pushRenderCommand(cmd); - for (; i < len; i++) { - children[i].visit(this); - } for (; j < pLen; j++) { pChild = pChildren[j]; if (!pChild) continue; cmd._changeProtectedChild(pChild); pChild.visit(this); } + for (; i < len; i++) { + children[i].visit(this); + } if (locGrid && locGrid._active) locGrid.afterDraw(this);