Merge pull request #331 from tangziwen/v3

fix crash when the visiting camera is not exist
This commit is contained in:
XiaoYang 2015-05-19 15:01:34 +08:00
commit 39340c52ed
1 changed files with 1 additions and 1 deletions

View File

@ -701,7 +701,7 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
{
#if CC_USE_CULLING
// camera clipping
if(!Camera::getVisitingCamera()->isVisibleInFrustum(&this->getAABB()))
if(Camera::getVisitingCamera() && !Camera::getVisitingCamera()->isVisibleInFrustum(&this->getAABB()))
return;
#endif