[FIRE-36091] Follow-up null checks on mVObjp to prevent crashes

Merged upstream in SLViewer PR#4996
master
Hecklezz 2025-11-13 16:53:10 +10:00
parent 17ff1613f1
commit edcfa9e3c1
5 changed files with 10 additions and 5 deletions

View File

@ -967,6 +967,11 @@ void LLDrawable::updateTexture()
return;
}
if (!mVObjp)
{
return;
}
if (getNumFaces() != mVObjp->getNumTEs())
{ //drawable is transitioning its face count
return;

View File

@ -133,7 +133,7 @@ public:
void setIndexInTex(U32 ch, S32 index) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); mIndexInTex[ch] = index; }
void setWorldMatrix(const LLMatrix4& mat);
const LLTextureEntry* getTextureEntry() const { return mVObjp->getTE(mTEOffset); }
const LLTextureEntry* getTextureEntry() const { return mVObjp ? mVObjp->getTE(mTEOffset) : nullptr; }
LLFacePool* getPool() const { return mDrawPoolp; }
U32 getPoolType() const { return mPoolType; }

View File

@ -7459,7 +7459,7 @@ void LLAlphaObject::getBlendFunc(S32 face, LLRender::eBlendFactor& src, LLRender
void LLStaticViewerObject::updateDrawable(bool force_damped)
{
// Force an immediate rebuild on any update
if (mDrawable.notNull())
if (mDrawable.notNull() && mDrawable->getVObj())
{
mDrawable->updateXform(true);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);

View File

@ -781,7 +781,7 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
void LLVOGrass::updateDrawable(bool force_damped)
{
// Force an immediate rebuild on any update
if (mDrawable.notNull())
if (mDrawable.notNull() && mDrawable->getVObj())
{
mDrawable->updateXform(true);
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL);

View File

@ -3093,7 +3093,7 @@ void LLPipeline::markMoved(LLDrawable *drawablep, bool damped_motion)
void LLPipeline::markShift(LLDrawable *drawablep)
{
if (!drawablep || drawablep->isDead())
if (!drawablep || drawablep->isDead() || !drawablep->getVObj())
{
return;
}
@ -3127,7 +3127,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
iter != mShiftList.end(); iter++)
{
LLDrawable *drawablep = *iter;
if (drawablep->isDead())
if (drawablep->isDead() || !drawablep->getVObj())
{
continue;
}