SL-15185 Crash "The face does not have a valid texture"

master
Andrey Kleshchev 2021-05-17 23:49:53 +03:00
parent e5a428f362
commit 1c2f58fdcd
1 changed files with 16 additions and 5 deletions

View File

@ -3525,11 +3525,22 @@ BOOL LLViewerMediaTexture::findFaces()
for(; iter != obj_list->end(); ++iter)
{
LLVOVolume* obj = *iter;
if(obj->mDrawable.isNull())
{
ret = FALSE;
continue;
}
if (obj->isDead())
{
// Isn't supposed to happen, objects are supposed to detach
// themselves on markDead()
// If this happens, viewer is likely to crash
llassert(0);
LL_WARNS() << "Dead object in mMediaImplp's object list" << LL_ENDL;
ret = FALSE;
continue;
}
if (obj->mDrawable.isNull() || obj->mDrawable->isDead())
{
ret = FALSE;
continue;
}
S32 face_id = -1;
S32 num_faces = obj->mDrawable->getNumFaces();