Guard against inventory get failures.

connector_plugin
Diva Canto 2012-09-22 14:01:51 -07:00
parent 772aedc731
commit 87d810217e
1 changed files with 3 additions and 0 deletions

View File

@ -859,6 +859,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
InventoryItemBase item = new InventoryItemBase(itemID, sp.UUID);
item = m_scene.InventoryService.GetItem(item);
if (item == null)
return;
bool changed = sp.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID);
if (changed && m_scene.AvatarFactory != null)
{