From 956fd854015a0a34fce35e17a96e70d51b185e15 Mon Sep 17 00:00:00 2001 From: minggo Date: Fri, 19 Jul 2019 16:53:20 +0800 Subject: [PATCH] sync 19661: Clear the scene stack in the expected order (#19935) --- cocos/base/CCDirector.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cocos/base/CCDirector.cpp b/cocos/base/CCDirector.cpp index 52dfa90e66..1e6ae49b90 100644 --- a/cocos/base/CCDirector.cpp +++ b/cocos/base/CCDirector.cpp @@ -995,7 +995,12 @@ void Director::reset() } } #endif // CC_ENABLE_GC_FOR_NATIVE_OBJECTS - _scenesStack.clear(); + + while (!_scenesStack.empty()) + { + _scenesStack.popBack(); + } + stopAnimation();