summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2018-01-23 16:43:11 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2018-01-23 16:43:11 +0200
commit63b36c6f69f8b73528894900005bf9d5314a8c48 (patch)
tree0725d6b38d3809cfefb074db06ffa74b85e0981e /indra/newview
parentaf8984348ea2b94c8080726ec82ba02b1adf1fac (diff)
MAINT-8197 Check buffer before using it
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llglsandbox.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 1b6494195b..c7128a55ae 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -1006,7 +1006,13 @@ F32 gpu_benchmark()
//make a dummy triangle to draw with
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, GL_STATIC_DRAW_ARB);
- buff->allocateBuffer(3, 0, true);
+
+ if (!buff->allocateBuffer(3, 0, true))
+ {
+ LL_WARNS() << "Failed to allocate buffer during benchmark." << LL_ENDL;
+ // abandon the benchmark test
+ return -1.f;
+ }
LLStrider<LLVector3> v;
LLStrider<LLVector2> tc;