A few nullchecks, and removal of pointless uint < 0 bounds checks.

This commit is contained in:
Shyotl
2012-08-30 02:52:10 -05:00
committed by Siana Gearz
parent fefb40bda2
commit 6ec4c65f04
3 changed files with 11 additions and 6 deletions

View File

@@ -758,9 +758,13 @@ BOOL LLImagePreviewAvatar::render()
// make sure alpha=0 shows avatar material color
LLGLDisable no_blend(GL_BLEND);
LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool();
gPipeline.enableLightsPreview();
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
LLFace* face = avatarp->mDrawable->getFace(0);
if (face)
{
LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)face->getPool();
gPipeline.enableLightsPreview();
avatarPoolp->renderAvatars(avatarp); // renders only one avatar
}
}
gGL.color4f(1,1,1,1);