summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-11-08 14:51:48 -0800
committerCosmic Linden <cosmic@lindenlab.com>2023-11-09 13:54:42 -0800
commit4ad7e250f3302a6158378a5acbf88ac27dd95ced (patch)
tree29bc41cb5ee3965fc4fa888cca0117a9e09ba128 /indra/newview
parent0d50f29697f999c91a4bed702b9bae281b247250 (diff)
SL-20553: Fix assert
Diffstat (limited to 'indra/newview')
-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);
}