diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-11-29 23:40:12 +0000 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2017-11-29 23:40:12 +0000 |
commit | 5c7f27562dc1ef449f23be5ab747a19c23eec361 (patch) | |
tree | 658416eb1f85eaa96dbc9a4a9762b0029e520476 /indra/newview/llfloaterimagepreview.cpp | |
parent | 84b6bce4ee9299454aca75d8f876b6582b756ff6 (diff) | |
parent | 1693ccba58eef676df1f91e50627545ac35bb819 (diff) |
merge
Diffstat (limited to 'indra/newview/llfloaterimagepreview.cpp')
-rw-r--r-- | indra/newview/llfloaterimagepreview.cpp | 8 |
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; |