diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-11-10 23:50:46 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-11-10 23:50:46 +0200 |
commit | 44782e475c8f30af38986d5c97f8dafaee0575b2 (patch) | |
tree | 27edd7afaad1580aa681389c83f663835bfed45e /indra | |
parent | 424593c05e72061ac74969726788140c5ca7192f (diff) |
SL-18602 Crashfix
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index c5a5175780..dbc3fe0ce5 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2219,10 +2219,6 @@ void LLSelectMgr::selectionRevertGLTFMaterials() LLUUID asset_id = nodep->mSavedGLTFMaterialIds[te]; objectp->setRenderMaterialID(te, asset_id, false /*wait for bulk update*/); - // Restore overrides - LLSD overrides; - overrides["object_id"] = objectp->getID(); - overrides["side"] = te; // todo: make sure this does not cause race condition with setRenderMaterialID // when we are reverting from null id to non null plus override @@ -2230,10 +2226,20 @@ void LLSelectMgr::selectionRevertGLTFMaterials() && nodep->mSavedGLTFOverrideMaterials[te].notNull() && asset_id.notNull()) { + // Restore overrides + LLSD overrides; + overrides["object_id"] = objectp->getID(); + overrides["side"] = te; + overrides["gltf_json"] = nodep->mSavedGLTFOverrideMaterials[te]->asJSON(); - } // else nothing to blank override out + LLGLTFMaterialList::queueUpdate(overrides); + } + else + { + //blank override out + LLGLTFMaterialList::queueApply(objectp->getID(), te, asset_id); + } - LLGLTFMaterialList::queueUpdate(overrides); } return true; } |