diff options
author | Oz Linden <oz@lindenlab.com> | 2012-12-10 15:24:08 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-12-10 15:24:08 -0500 |
commit | 623a06aabd9d7e5c7e74211360aa233ec33e4977 (patch) | |
tree | 21c815db542e45fc07473cd26a24561c5f27add8 /indra/llrender/llvertexbuffer.cpp | |
parent | d56a98dea4c7523a759bea4740d8bdde1df15e30 (diff) | |
parent | a9ada0cc6a1418da0908f995b1369912a270b22d (diff) |
merge release tag
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index eadef93c89..2fe0aa0b72 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -555,8 +555,21 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, con gGL.syncMatrices(); U32 count = pos.size(); - llassert_always(norm.size() >= pos.size()); - llassert_always(count > 0); + + llassert(norm.size() >= pos.size()); + llassert(count > 0); + + if( count == 0 ) + { + llwarns << "Called drawArrays with 0 vertices" << llendl; + return; + } + + if( norm.size() < pos.size() ) + { + llwarns << "Called drawArrays with #" << norm.size() << " normals and #" << pos.size() << " vertices" << llendl; + return; + } unbind(); |