In AppDelegate, I use Director::getInstance()-runWithScene(SceneA::createScene())
In the init of SceneA, if some conditions are met, I use Director::getInstance()->pushScene(SceneB::createScene())
In the init of SceneB, if some conditions fail, I use Director::getInstance()->popScene()
It is here that the app crashes.
In logcat, I get:
D/cocos2d-x debug info: Assert failed: running scene should not null
E/cocos2d-x assert: ../../../../../../cocos2d/cocos/base/CCDirector.cpp function:popScene line:919
D/cocos2d-x debug info: Assert failed: no objects added
E/cocos2d-x assert: ../../../../../../cocos2d/cocos\base/CCVector.h function:popBack line:366
Any help would be appreciated.