From 32f8b474971d0d2fc029dda0d567ace6f9a750c1 Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Tue, 21 Jun 2011 12:00:38 -0600
Subject: [PATCH] debug code for SH-692: Viewer Crash when enabling Render
 Metadata > Physics Shapes on Mesh Sandbox 25 on Windows XP

---
 indra/llrender/llvertexbuffer.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 4a0b964e616..d5a7159ee38 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -240,7 +240,8 @@ void LLVertexBuffer::setupClientArrays(U32 data_mask)
 void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, const std::vector<LLVector3>& norm)
 {
 	U32 count = pos.size();
-	llassert(norm.size() >= pos.size());
+	llassert_always(norm.size() >= pos.size());
+	llassert_always(count > 0) ;
 
 	unbind();
 	
-- 
GitLab