summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-02-28 16:41:06 -0600
committerDave Parks <davep@lindenlab.com>2010-02-28 16:41:06 -0600
commit746037362ed07af0c799caf22cf9e425744359a0 (patch)
tree2e4c83fee5334da2071103fa4706ac4abb218490 /indra/llrender/llvertexbuffer.cpp
parent26a0c18e95d8d542016d89cc78b948438bc335cb (diff)
parentb414b5067e3e47da7d9baf490d94534b4c65a8eb (diff)
merge
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r--indra/llrender/llvertexbuffer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 116e265914..415d2f603b 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -668,6 +668,12 @@ void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER);
+ if (nverts < 0 || nindices < 0 ||
+ nverts > 65536)
+ {
+ llerrs << "Bad vertex buffer allocation: " << nverts << " : " << nindices << llendl;
+ }
+
updateNumVerts(nverts);
updateNumIndices(nindices);