EXT-3973 viewer crash
Rendering cost calculations didn't handle the case of a face having no image associated with it. Added in null checks before using the pointer to the image. Crash no longer repros. Code reviewed by Vir.master
parent
2ee8c95763
commit
80db391816
|
|
@ -2689,13 +2689,16 @@ U32 LLVOVolume::getRenderCost(std::set<LLUUID> &textures) const
|
|||
const LLTextureEntry* te = face->getTextureEntry();
|
||||
const LLViewerTexture* img = face->getTexture();
|
||||
|
||||
textures.insert(img->getID());
|
||||
if (img)
|
||||
{
|
||||
textures.insert(img->getID());
|
||||
}
|
||||
|
||||
if (face->getPoolType() == LLDrawPool::POOL_ALPHA)
|
||||
{
|
||||
alpha++;
|
||||
}
|
||||
else if (img->getPrimaryFormat() == GL_ALPHA)
|
||||
else if (img && img->getPrimaryFormat() == GL_ALPHA)
|
||||
{
|
||||
invisi = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue