diff options
author | Justin Clark-Casey (justincc) | 2011-12-09 22:36:51 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-12-09 22:36:51 +0000 |
commit | 94c242f79262fce6a898478c24edee78d70780d9 (patch) | |
tree | dad8cf3998372f8f9d1e3f33903d85464b12e4dd /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | Add commented log lines to FetchInventoryDescendents2 path for future use. (diff) | |
download | opensim-SC_OLD-94c242f79262fce6a898478c24edee78d70780d9.zip opensim-SC_OLD-94c242f79262fce6a898478c24edee78d70780d9.tar.gz opensim-SC_OLD-94c242f79262fce6a898478c24edee78d70780d9.tar.bz2 opensim-SC_OLD-94c242f79262fce6a898478c24edee78d70780d9.tar.xz |
Move client id check in Scene.Inventory.cs:UpdateInventoryItemAsset so that it doesn't trigger an exception if the item hasn't been found.
In this situation we will now put out a slightly more meaningful log error message instead.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 26eb729..b62023b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -337,11 +337,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
337 | // Passing something to another avatar or a an object will already | 337 | // Passing something to another avatar or a an object will already |
338 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); | 338 | InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); |
339 | item = InventoryService.GetItem(item); | 339 | item = InventoryService.GetItem(item); |
340 | if (item.Owner != remoteClient.AgentId) | ||
341 | return; | ||
342 | 340 | ||
343 | if (item != null) | 341 | if (item != null) |
344 | { | 342 | { |
343 | if (item.Owner != remoteClient.AgentId) | ||
344 | return; | ||
345 | |||
345 | if (UUID.Zero == transactionID) | 346 | if (UUID.Zero == transactionID) |
346 | { | 347 | { |
347 | item.Name = itemUpd.Name; | 348 | item.Name = itemUpd.Name; |
@@ -388,8 +389,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
388 | } | 389 | } |
389 | else | 390 | else |
390 | { | 391 | { |
391 | m_log.Error( | 392 | m_log.ErrorFormat( |
392 | "[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update."); | 393 | "[AGENTINVENTORY]: Item id {0} not found for an inventory item update for {1}.", |
394 | itemID, remoteClient.Name); | ||
393 | } | 395 | } |
394 | } | 396 | } |
395 | 397 | ||