mirror of https://github.com/axmolengine/axmol.git
allow null index buffer when create primitive
This commit is contained in:
parent
2dca0a4809
commit
a0d1b0dad8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue