diff options
author | Stinson Linden <stinson@lindenlab.com> | 2014-05-19 22:19:55 +0100 |
---|---|---|
committer | Stinson Linden <stinson@lindenlab.com> | 2014-05-19 22:19:55 +0100 |
commit | babd89b77050ab49166f2fbd6d460884070140d9 (patch) | |
tree | dd3039e009f3e0f7ca2de578f4599e79ca15a1dc /indra/newview/lltooldraganddrop.cpp | |
parent | 08e83a341e76de8fa4d8c4a974edbe3e0bd1c128 (diff) | |
parent | 644ca6a0f8a7759119814f88df93b8e838321a12 (diff) |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-release.
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rwxr-xr-x | indra/newview/lltooldraganddrop.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 12086dad5f..d307a31843 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1611,16 +1611,19 @@ static void show_item_sharing_confirmation(const std::string name, llassert(NULL != inv_item); return; } - - LLSD substitutions; - substitutions["RESIDENTS"] = name; - substitutions["ITEMS"] = inv_item->getName(); - LLSD payload; - payload["agent_id"] = dest_agent; - payload["item_id"] = inv_item->getUUID(); - payload["session_id"] = session_id; - payload["d&d_dest"] = dest.asString(); - LLNotificationsUtil::add("ShareItemsConfirmation", substitutions, payload, &give_inventory_cb); + if(gInventory.getItem(inv_item->getUUID()) + && LLGiveInventory::isInventoryGiveAcceptable(inv_item)) + { + LLSD substitutions; + substitutions["RESIDENTS"] = name; + substitutions["ITEMS"] = inv_item->getName(); + LLSD payload; + payload["agent_id"] = dest_agent; + payload["item_id"] = inv_item->getUUID(); + payload["session_id"] = session_id; + payload["d&d_dest"] = dest.asString(); + LLNotificationsUtil::add("ShareItemsConfirmation", substitutions, payload, &give_inventory_cb); + } } static void get_name_cb(const LLUUID& id, |