summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-12-15 12:34:37 +0800
committerErik Kundiman <erik@megapahit.org>2024-12-15 12:34:37 +0800
commit3316ffb3b571b8730d26d6e8b2ee00fc9cbdf7c0 (patch)
tree200cd8497a4fdd782ac4dbfd2ad5fb1632e03275 /indra/newview/llselectmgr.cpp
parentd4e433b37af94ee11880deeede74a87a728f4775 (diff)
parent5b77436cf0ad749d36e8f0c60077eeb24698d644 (diff)
Merge remote-tracking branch 'secondlife/release/2024.09-ExtraFPS' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 796cc8bb5e..03cf79c28c 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -2251,11 +2251,15 @@ void LLSelectMgr::selectionRevertGLTFMaterials()
// Update material locally
objectp->setRenderMaterialID(te, asset_id, false /*wait for LLGLTFMaterialList update*/);
- LLGLTFMaterial* material = new LLGLTFMaterial(*nodep->mSavedGLTFOverrideMaterials[te]);
- objectp->setTEGLTFMaterialOverride(te, material);
+ LLGLTFMaterial* material = nodep->mSavedGLTFOverrideMaterials[te];
+ if (material)
+ {
+ material = new LLGLTFMaterial(*material);
+ objectp->setTEGLTFMaterialOverride(te, material);
+ }
// Enqueue update to server
- if (asset_id.notNull())
+ if (asset_id.notNull() && material)
{
// Restore overrides and base material
LLGLTFMaterialList::queueApply(objectp, te, asset_id, material);