diff options
| author | Hecklezz <tj8@live.com.au> | 2025-11-13 15:55:28 +1000 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-11-13 10:18:19 +0200 |
| commit | 4b78edbd1cd62b34f0b3f2b98ab4398437c6bc4d (patch) | |
| tree | 7991f317f145497df96b97e63364e4324ef5b1d0 | |
| parent | 516a3d0dae7117068175df925ec2216430350b76 (diff) | |
Follow-up null checks on mVObjp to prevent crashes
Signed-off-by: Hecklezz <tj8@live.com.au>
| -rw-r--r-- | indra/newview/lldrawable.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/llface.h | 2 | ||||
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llvograss.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 4 |
5 files changed, 10 insertions, 5 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 6f8fb34fb3..322ee90541 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -954,6 +954,11 @@ void LLDrawable::updateTexture() return; } + if (!mVObjp) + { + return; + } + if (getNumFaces() != mVObjp->getNumTEs()) { //drawable is transitioning its face count return; diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 65637fbf85..db18f6643e 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -127,7 +127,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; } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index ed4856df11..59bcad9a26 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -7235,7 +7235,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); diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index fdd39a0e30..86d08b8658 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -736,7 +736,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); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 7f30baa66c..0aa6ffb335 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2955,7 +2955,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; } @@ -2989,7 +2989,7 @@ void LLPipeline::shiftObjects(const LLVector3 &offset) iter != mShiftList.end(); iter++) { LLDrawable *drawablep = *iter; - if (drawablep->isDead()) + if (drawablep->isDead() || !drawablep->getVObj()) { continue; } |
