diff options
author | Dave Parks <davep@lindenlab.com> | 2010-07-08 15:14:23 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-07-08 15:14:23 -0500 |
commit | 3d9413377638886ca2c6616f13be18beac00ebeb (patch) | |
tree | 4d1922210cbfe00ad17994d0f4726007c6e4aed2 /indra/newview/lldrawable.h | |
parent | b056f6d7f7f33542177cc2c118743e2a8950e925 (diff) |
EXT-8287 Add some null checks and asserts around drawable faces.
Diffstat (limited to 'indra/newview/lldrawable.h')
-rw-r--r-- | indra/newview/lldrawable.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h index 651dabff9e..08972853c3 100644 --- a/indra/newview/lldrawable.h +++ b/indra/newview/lldrawable.h @@ -313,8 +313,20 @@ private: inline LLFace* LLDrawable::getFace(const S32 i) const { - llassert((U32)i < mFaces.size()); - llassert(mFaces[i]); + //switch these asserts to llerrs -- davep + //llassert((U32)i < mFaces.size()); + //llassert(mFaces[i]); + + if ((U32) i >= mFaces.size()) + { + llerrs << "Invalid face index." << llendl; + } + + if (!mFaces[i]) + { + llerrs << "Null face found." << llendl; + } + return mFaces[i]; } |