summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-11-16 02:22:54 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-11-16 02:22:54 +0200
commit5ccdcf51a3b4cb46a8c9134636bc3bd5f2129f92 (patch)
treefd0dbaf5b47674beaf7abd159bfec5fcd1428766 /indra/newview/llviewertexture.cpp
parent3641541c6cc7f33f0e0dc2e1eb2cfdfcec23322b (diff)
parent9957c28ddc5e5c129af2db662da7d69f1509af65 (diff)
Merge branch master (DRTVWR-545) into DRTVWR-542-meshopt
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-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 ca01bb46aa..7fbc4d789b 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3518,11 +3518,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();