summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimagepreview.cpp
diff options
context:
space:
mode:
authorAnkur Ahlawat <anchor@lindenlab.com>2018-01-04 00:54:41 -0800
committerAnkur Ahlawat <anchor@lindenlab.com>2018-01-04 00:54:41 -0800
commitd4ce47b09122d1f76601ba402c2b9ad6bb504950 (patch)
tree2f9a4aca02618d53d31ac62625645f89fb30c52f /indra/newview/llfloaterimagepreview.cpp
parent93100236ae34eaa9cd3fa314e7e770339c13eba7 (diff)
parent1693ccba58eef676df1f91e50627545ac35bb819 (diff)
Merged lindenlab/viewer-release into default
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;