DEV-33767 VWR-13897: Deleting multiple open animations crashes the viewer

We were closing preview floaters while we were in the middle of assembling the MoveInventoryItem message.  But closing an anim preview floater issues a AgentAnimation message to stop any playing animation previews.  On resuming the MoveInventoryItem assembly, message system is in a rightly confused state.

Made preview window closing happen before we start assembling the MoveInventoryItem message.
meow-7.2.2
Tofu Linden 2010-02-15 16:48:41 +00:00
parent 7c640406dd
commit ed116da131
1 changed files with 18 additions and 3 deletions

View File

@ -293,12 +293,27 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
LLMessageSystem* msg = gMessageSystem;
const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
LLViewerInventoryItem* item = NULL;
LLViewerInventoryCategory* cat = NULL;
std::vector<LLUUID> move_ids;
LLInventoryModel::update_map_t update;
bool start_new_message = true;
S32 count = batch.count();
S32 i;
// first, hide any 'preview' floaters that correspond to the items
// being deleted.
for(i = 0; i < count; ++i)
{
bridge = (LLInvFVBridge*)(batch.get(i));
if(!bridge || !bridge->isItemRemovable()) continue;
item = (LLViewerInventoryItem*)model->getItem(bridge->getUUID());
if(item)
{
LLPreview::hide(item->getUUID());
}
}
// do the inventory move to trash
for(i = 0; i < count; ++i)
{
bridge = (LLInvFVBridge*)(batch.get(i));
@ -308,7 +323,6 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
{
if(item->getParentUUID() == trash_id) continue;
move_ids.push_back(item->getUUID());
LLPreview::hide(item->getUUID());
--update[item->getParentUUID()];
++update[trash_id];
if(start_new_message)
@ -340,11 +354,12 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*
gInventory.accountForUpdate(update);
update.clear();
}
for(i = 0; i < count; ++i)
{
bridge = (LLInvFVBridge*)(batch.get(i));
if(!bridge || !bridge->isItemRemovable()) continue;
cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID());
LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)model->getCategory(bridge->getUUID());
if(cat)
{
if(cat->getParentUUID() == trash_id) continue;