summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimagepreview.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2017-11-01 19:36:13 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2017-11-01 19:36:13 +0200
commit149b2d88dd75bddf1cb3e9927c4e8fcc84e263e1 (patch)
treeb02a4d2775cec34281b637a6f4d1ae0c40faa976 /indra/newview/llfloaterimagepreview.cpp
parentfec6bbddc371b2d1e0aa41d39a1b3dfaa8fb2016 (diff)
MAINT-7228 Vertex buffer allocation failure handling
Diffstat (limited to 'indra/newview/llfloaterimagepreview.cpp')
-rw-r--r--indra/newview/llfloaterimagepreview.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index 52e678ce24..a9e4d752ac 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -801,7 +801,13 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance)
U32 num_vertices = vf.mNumVertices;
mVertexBuffer = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0, 0);
- mVertexBuffer->allocateBuffer(num_vertices, num_indices, TRUE);
+ if (!mVertexBuffer->allocateBuffer(num_vertices, num_indices, TRUE))
+ {
+ LL_WARNS() << "Failed to allocate Vertex Buffer for image preview to"
+ << num_vertices << " vertices and "
+ << num_indices << " indices" << LL_ENDL;
+ // We are likely to crash on getTexCoord0Strider()
+ }
LLStrider<LLVector3> vertex_strider;
LLStrider<LLVector3> normal_strider;