diff options
author | Nicky <sl.nicky.ml@googlemail.com> | 2016-04-24 12:55:13 +0200 |
---|---|---|
committer | Nicky <sl.nicky.ml@googlemail.com> | 2016-04-24 12:55:13 +0200 |
commit | c4e21cf2828517e761657eb70bf516d84f17fc77 (patch) | |
tree | 0eab81bd50910f7f22489c053e89e7ffacd0db3d | |
parent | a590d1c63ae4c1434da600d60b5c32c9b8a7a1de (diff) |
Fix a crash is drawn vertices is 0.
(transplanted from 89b3e585218ddb8d6a3e62af29f8daf889371e5e)
-rw-r--r-- | indra/llrender/llrender.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 69420dd0bb..0e242a20f6 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -2039,7 +2039,8 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count) } } - mVerticesp[mCount] = mVerticesp[mCount-1]; + if( mCount > 0 ) // ND: Guard against crashes if mCount is zero, yes it can happen + mVerticesp[mCount] = mVerticesp[mCount-1]; } void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 vert_count) |