diff options
author | Justin Clark-Casey (justincc) | 2011-05-17 02:25:05 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-05-17 02:25:05 +0100 |
commit | 784f70f70405aa5b163865a01637fe6132dd1bc5 (patch) | |
tree | a6aab22339c18d9b7ed612737376126fd500ba43 | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-784f70f70405aa5b163865a01637fe6132dd1bc5.zip opensim-SC-784f70f70405aa5b163865a01637fe6132dd1bc5.tar.gz opensim-SC-784f70f70405aa5b163865a01637fe6132dd1bc5.tar.bz2 opensim-SC-784f70f70405aa5b163865a01637fe6132dd1bc5.tar.xz |
don't throw a null reference if an inventory link target doesn't exist when we're inspecting in order to send the required inventory folders
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index e2420101..7b88f4f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1404,7 +1404,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1404 | if (item.AssetType == (int)AssetType.Link) | 1404 | if (item.AssetType == (int)AssetType.Link) |
1405 | { | 1405 | { |
1406 | InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID)); | 1406 | InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID)); |
1407 | linkedItemFolderIdsToSend.Add(linkedItem.Folder); | 1407 | |
1408 | // Take care of genuinely broken links where the target doesn't exist | ||
1409 | if (linkedItem != null) | ||
1410 | linkedItemFolderIdsToSend.Add(linkedItem.Folder); | ||
1408 | } | 1411 | } |
1409 | } | 1412 | } |
1410 | 1413 | ||