summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-05-17 23:49:53 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-05-17 23:52:35 +0300
commit1c2f58fdcda20f8f7d2cb6e8ebcf64df5a01ed09 (patch)
treebb1a5f34a6b64b824a24c921cb02cae5beacfbb4 /indra
parente5a428f36246dc9ce7888d7f5a4ec8714565298c (diff)
SL-15185 Crash "The face does not have a valid texture"
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewertexture.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 20a22ba45e..f5c4192d36 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -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();