summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturectrl.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2023-09-29 04:34:12 -0700
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2023-09-29 04:34:12 -0700
commit32bfafca4dab088b5aab89affb233aaaac65666a (patch)
tree28a3638a697f77518af4e6fd3760f883f904a391 /indra/newview/lltexturectrl.cpp
parent052d5c2802fa427ad97bc26ed4ec114b7fd1b80e (diff)
parenta95ad7aac7248c5b81e5d9dd9e606b5ecb61e301 (diff)
Merge branch 'DRTVWR-559' into DRTVWR-583
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r--indra/newview/lltexturectrl.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 7e399a6808..bbacec843b 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -2101,8 +2101,16 @@ BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
return mDropCallback(this, item);
}
- // no callback installed, so just set the image ids and carry on.
- setImageAssetID( item->getAssetUUID() );
+ // no callback installed, so just set the image ids and carry on.
+ LLUUID asset_id = item->getAssetUUID();
+
+ if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL && asset_id.isNull())
+ {
+ // If an inventory material has a null asset, consider it a valid blank material(gltf)
+ asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
+ }
+
+ setImageAssetID(asset_id);
mImageItemID = item->getUUID();
return TRUE;
}