summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimagepreview.cpp
diff options
context:
space:
mode:
authorsimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-05-07 13:24:52 -0700
committersimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-05-07 13:24:52 -0700
commit71bbb384b056476bbf1177d20b2ade16ca0a4bcf (patch)
treecf6c14b1886190f9ae723c065d43e3b243f82a72 /indra/newview/llfloaterimagepreview.cpp
parent68ec4d8355326f7c42c8e6fbabe774df6e5f41dd (diff)
MAINT-753 : [crashhunters] crash at LLVOVolume::updateFaceFlags(). Null pointer checks are good.
Reviewed by Kelly
Diffstat (limited to 'indra/newview/llfloaterimagepreview.cpp')
-rw-r--r--indra/newview/llfloaterimagepreview.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp
index 92ee8ddac6..6b2492d927 100644
--- a/indra/newview/llfloaterimagepreview.cpp
+++ b/indra/newview/llfloaterimagepreview.cpp
@@ -704,9 +704,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.popUIMatrix();