Skip to content
Snippets Groups Projects
Commit e0b334c6 authored by Nicky's avatar Nicky
Browse files

Crashfix; Change llassert_always to llassert + llwarns. This way users don't...

Crashfix; Change llassert_always to llassert + llwarns. This way users don't get disruptive crashes.
parent fdb0218b
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment