From 6502e8bf33e6775d160ec90c666bb507bd9bb242 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 14 Nov 2017 18:55:36 +0200 Subject: MAINT-7228 Vertex buffer allocation failure handling --- indra/newview/lldrawpoolavatar.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra') diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index bb5c86f705..e38c7ee080 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1613,6 +1613,14 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer( } } + if (buffer.isNull() || + buffer->getNumVerts() != vol_face.mNumVertices || + buffer->getNumIndices() != vol_face.mNumIndices) + { + // Allocation failed + return; + } + if (sShaderLevel <= 0 && face->mLastSkinTime < avatar->getLastSkinTime()) { //perform software vertex skinning for this face -- cgit v1.2.3