Crash fix due to invalid calls to drawElements by Drake Arconis
parent
286430cf15
commit
d2c3f41e1e
|
|
@ -616,6 +616,14 @@ void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVecto
|
|||
{
|
||||
llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
|
||||
|
||||
// <FS:Ansariel> Crash fix due to invalid calls to drawElements by Drake Arconis
|
||||
if (num_indices <= 0)
|
||||
{
|
||||
LL_WARNS() << "Called drawElements with 0 indices" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.syncMatrices();
|
||||
|
||||
U32 mask = LLVertexBuffer::MAP_VERTEX;
|
||||
|
|
|
|||
|
|
@ -2514,7 +2514,10 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
|
|||
}
|
||||
}
|
||||
|
||||
if (phys_volume->mHullPoints)
|
||||
// <FS:Ansariel> Crash fix due to invalid calls to drawElements by Drake Arconis
|
||||
//if (phys_volume->mHullPoints)
|
||||
if (phys_volume->mHullPoints && phys_volume->mHullIndices && phys_volume->mNumHullPoints > 0 && phys_volume->mNumHullIndices > 0)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
//render hull
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue