X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FOpenGl%2FOpenGl_PrimitiveArray.cxx;h=811097de6c9809d7c90c033b74e4250d417f6324;hb=09f30297f40a58f2aaa7a91a930088662becadbb;hpb=ad03c2344920e9a5ddcb6527aab24470970a026f diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index 47c789c6af..811097de6c 100644 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -943,12 +943,13 @@ void OpenGl_PrimitiveArray::setDrawMode (const Graphic3d_TypeOfPrimitiveArray th Standard_Boolean OpenGl_PrimitiveArray::processIndices (const Handle(OpenGl_Context)& theContext) const { if (myIndices.IsNull() + || myAttribs.IsNull() || theContext->hasUintIndex) { return Standard_True; } - if (myIndices->NbElements > std::numeric_limits::max()) + if (myAttribs->NbElements > std::numeric_limits::max()) { Handle(Graphic3d_Buffer) anAttribs = new Graphic3d_Buffer (new NCollection_AlignedAllocator (16)); if (!anAttribs->Init (myIndices->NbElements, myAttribs->AttributesArray(), myAttribs->NbAttributes))