A few nullchecks, and removal of pointless uint < 0 bounds checks.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user