diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-10-01 13:39:35 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-10-01 13:39:35 +0800 |
commit | dcdd85e4342305bf363c76e6de1e8f8e0ea8840d (patch) | |
tree | eedd18efe98fc65b2244557a79d10b99c993ad7c /indra/newview/lltexturectrl.cpp | |
parent | 5dfad9ddbb5c7dce635ba01f3fe480bd42896532 (diff) | |
parent | a95ad7aac7248c5b81e5d9dd9e606b5ecb61e301 (diff) |
Merge branch 'DRTVWR-559' of https://github.com/secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/lltexturectrl.cpp')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 12 |
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; } |