Skip to content

Commit 956fd85

Browse files
authored
sync 19661: Clear the scene stack in the expected order (#19935)
1 parent 838c285 commit 956fd85

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cocos/base/CCDirector.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,12 @@ void Director::reset()
995995
}
996996
}
997997
#endif // CC_ENABLE_GC_FOR_NATIVE_OBJECTS
998-
_scenesStack.clear();
998+
999+
while (!_scenesStack.empty())
1000+
{
1001+
_scenesStack.popBack();
1002+
}
1003+
9991004

10001005
stopAnimation();
10011006

0 commit comments

Comments
 (0)