check running scene when checkVisibility

This commit is contained in:
yangxiao 2014-09-01 09:56:05 +08:00
parent d2a6eb385d
commit 49e6b098a6
1 changed files with 1 additions and 1 deletions

View File

@ -553,7 +553,7 @@ bool Renderer::checkVisibility(const Mat4 &transform, const Size &size)
{ {
auto scene = Director::getInstance()->getRunningScene(); auto scene = Director::getInstance()->getRunningScene();
// only cull the default camera. The culling algorithm is valid for default camera. // only cull the default camera. The culling algorithm is valid for default camera.
if (scene->_defaultCamera != Camera::getVisitingCamera()) if (scene && scene->_defaultCamera != Camera::getVisitingCamera())
return true; return true;
// half size of the screen // half size of the screen