diff options
author | Merov Linden <merov@lindenlab.com> | 2012-11-26 15:01:57 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-11-26 15:01:57 -0800 |
commit | 8076f7a33d7f5ee93d4ba8f71a7ba0fed5e364a7 (patch) | |
tree | 6a7d0f88666e16948e73d1098c99edc7513b6e49 /indra/llrender/llvertexbuffer.cpp | |
parent | 7ca2508cc2adcdc5201bd53e814246e156bc6013 (diff) | |
parent | 890965faf5baa5f6f832e086991d59bb8d33b7bc (diff) |
Pull merge from richard/viewer-chui
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(); |