diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index b31fb2d6ef..ce3aab8c2b 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -698,6 +698,14 @@ void LLVertexBuffer::drawElements(U32 mode, const S32 num_vertices, const LLVect
//
{
llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
+
+ // FIRE-29679 trap empty calls that cause crashes when rezzing in OpenSim.
+ if(pos == nullptr || indicesp == nullptr )
+ {
+ LL_WARNS() << "Called drawElements with null pos or null indices" << LL_ENDL;
+ return;
+ }
+ //
// Crash fix due to invalid calls to drawElements by Drake Arconis
if (num_vertices <= 0)
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 30a57232dd..d780afd596 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -658,14 +658,7 @@ void renderFace(LLDrawable* drawable, LLFace *face)
const LLVolumeFace& vol_face = volume->getVolumeFace(face->getTEOffset());
// Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
//LLVertexBuffer::drawElements(LLRender::TRIANGLES, vol_face.mPositions, NULL, vol_face.mNumIndices, vol_face.mIndices);
- // FIRE-29679 trap empty calls that cause crashes when rezzing in OpenSim.
- // Note: the drawElements() call checks for 0 length but in this case the number is non-zero but pointer is null.
- // LLVertexBuffer::drawElements(LLRender::TRIANGLES, vol_face.mNumVertices, vol_face.mPositions, NULL, vol_face.mNumIndices, vol_face.mIndices);
- if (vol_face.mIndices != nullptr && vol_face.mPositions != nullptr)
- {
- LLVertexBuffer::drawElements(LLRender::TRIANGLES, vol_face.mNumVertices, vol_face.mPositions, NULL, vol_face.mNumIndices, vol_face.mIndices);
- }
- //
+ LLVertexBuffer::drawElements(LLRender::TRIANGLES, vol_face.mNumVertices, vol_face.mPositions, NULL, vol_face.mNumIndices, vol_face.mIndices);
}
}
}