fixed CocoStudio SceneTest crash when it quits.
Merge pull request #5465 from chengstory/fixesSceneTestCrash

fixed CocoStudio SceneTest crash when it quits.