summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-03-03 17:41:34 +0200
committerandreykproductengine <akleshchev@productengine.com>2015-03-03 17:41:34 +0200
commit5220b0903ce82c0365a07a92ae98fd54cc923bf1 (patch)
treec736c6342686b1db6bd11fc0ee60f03eb30c9d4c /indra/newview
parent903d9d123643e0590c4ed6a162271d0736a4f167 (diff)
MAINT-4897 FIXED Frequent error when texturing a linkset - "Unable to add texture. Please wait a few seconds and try again."
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/lltooldraganddrop.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index b077cad9f8..4e710747c5 100755
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -995,9 +995,15 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj,
return TRUE;
}
- // In case the inventory has not been updated (e.g. due to some recent operation
- // causing a dirty inventory), stall the user while fetching the inventory.
- if (hit_obj->isInventoryDirty())
+ // In case the inventory has not been loaded (e.g. due to some recent operation
+ // causing a dirty inventory) and we can do an update, stall the user
+ // while fetching the inventory.
+ //
+ // Note: fetch only if inventory is both dirty and not present since previously checked faces
+ // could have requested new fetch for same item (removed inventory and marked as dirty=false).
+ // Objects without listeners (dirty==true and inventory!=NULL. In this specific case - before
+ // first fetch) shouldn't be updated either since we won't receive any changes.
+ if (hit_obj->isInventoryDirty() && hit_obj->getInventoryRoot() == NULL)
{
hit_obj->fetchInventoryFromServer();
LLSD args;