mirror of https://github.com/axmolengine/axmol.git
check running scene when checkVisibility
This commit is contained in:
parent
d2a6eb385d
commit
49e6b098a6
|
@ -553,7 +553,7 @@ bool Renderer::checkVisibility(const Mat4 &transform, const Size &size)
|
|||
{
|
||||
auto scene = Director::getInstance()->getRunningScene();
|
||||
// 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;
|
||||
|
||||
// half size of the screen
|
||||
|
|
Loading…
Reference in New Issue