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

bulletsim
Justin Clark-Casey (justincc) 2011-05-17 02:25:05 +01:00
parent 467d7060ca
commit 784f70f704
1 changed files with 4 additions and 1 deletions

View File

@ -1404,7 +1404,10 @@ namespace OpenSim.Region.Framework.Scenes
if (item.AssetType == (int)AssetType.Link)
{
InventoryItemBase linkedItem = InventoryService.GetItem(new InventoryItemBase(item.AssetID));
linkedItemFolderIdsToSend.Add(linkedItem.Folder);
// Take care of genuinely broken links where the target doesn't exist
if (linkedItem != null)
linkedItemFolderIdsToSend.Add(linkedItem.Folder);
}
}