summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llmaterialeditor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 2f31889f32..2f4c29446e 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -1878,7 +1878,8 @@ bool can_use_objects_material(LLSelectedTEGetMatData& func, const std::vector<Pe
// Look for the item to base permissions off of
item_out = nullptr;
- if (func.mMaterialId != LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID)
+ const bool blank_material = func.mMaterialId == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
+ if (!blank_material)
{
LLAssetIDMatchesWithPerms item_has_perms(func.mMaterialId, ops);
if (item_source == ItemSource::OBJECT)
@@ -1970,7 +1971,7 @@ bool can_use_objects_material(LLSelectedTEGetMatData& func, const std::vector<Pe
// -Cosmic,2023-08-07
if (item_source == ItemSource::AGENT)
{
- llassert(item_out);
+ llassert(blank_material || item_out); // See comment at ItemSource::AGENT definition
permissions_out.set(item_permissions);
}