From 479477be52aa95fb1bcb52f2ae2c9f9fb4a9c2f7 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 10 Dec 2013 13:41:51 +0800 Subject: [PATCH] issue #2790: Stops all actions when reset _rootNode. --- cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp b/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp index bcdd041e01..f4faefcba6 100644 --- a/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp +++ b/cocos/editor-support/cocosbuilder/CCBAnimationManager.cpp @@ -53,6 +53,10 @@ CCBAnimationManager::~CCBAnimationManager() // Node *node = (Node*)pElement->getIntKey(); // node->release(); // } + if (_rootNode) + { + _rootNode->stopAllActions(); + } setRootNode(NULL); setDelegate(NULL);