diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-10-02 14:19:16 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-10-02 14:19:16 -0500 |
commit | 942df58666407b405ed4f82e05dea19dcc1a9f18 (patch) | |
tree | a18ddf43684f9a7099ee4ed9c58ca16bd59d78ec /indra/newview/lltexturectrl.cpp | |
parent | bc4e90ea5e462662f90c860d69aaa53b88f189c5 (diff) | |
parent | 153bd41bebae9f41e7c5e88dc54526eee152f6cf (diff) |
Merge branch 'DRTVWR-559' of 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; } |