[FIRE-36091] Follow-up null checks on mVObjp to prevent crashes
Merged upstream in SLViewer PR#4996master
parent
17ff1613f1
commit
edcfa9e3c1
|
|
@ -967,6 +967,11 @@ void LLDrawable::updateTexture()
|
|||
return;
|
||||
}
|
||||
|
||||
if (!mVObjp)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (getNumFaces() != mVObjp->getNumTEs())
|
||||
{ //drawable is transitioning its face count
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue