diff options
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r-- | indra/newview/lltooldraganddrop.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 6be7ec2262..4efa289141 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1447,9 +1447,10 @@ void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj, } LLTextureEntry* te = hit_obj->getTE(hit_face); - if (te && !remove_pbr) + LLGLTFMaterial * override_mat = nullptr; + if (te && !remove_pbr && (override_mat = te->getGLTFMaterialOverride())) { - LLGLTFMaterial* copy = new LLGLTFMaterial(*te->getGLTFMaterialOverride()); + LLGLTFMaterial* copy = new LLGLTFMaterial(*override_mat); nodep->mSavedGLTFOverrideMaterials[hit_face] = copy; } else |