allow null index buffer when create primitive

This commit is contained in:
Huabing.Xu 2014-08-04 17:21:23 +08:00
parent 2dca0a4809
commit a0d1b0dad8
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ Primitive::~Primitive()
bool Primitive::init(VertexData* verts, IndexBuffer* indices, PrimitiveType type)
{
if(nullptr == verts || nullptr == indices) return false;
if( nullptr == verts ) return false;
if(verts != _verts)
{
CC_SAFE_RELEASE(_verts);