If attachment fails (e.g. because asset wasn't found) then don't try to set attachment as shown in inventory

Doing this results in a null reference exception
This commit is contained in:
Justin Clark-Casey (justincc)
2010-09-13 20:58:50 +01:00
parent ff098ae110
commit 366de0a7b5

View File

@@ -233,11 +233,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
if (updateInventoryStatus)
{
if (att == null)
{
ShowDetachInUserInventory(itemID, remoteClient);
}
SetAttachmentInventoryStatus(att, remoteClient, itemID, AttachmentPt);
else
SetAttachmentInventoryStatus(att, remoteClient, itemID, AttachmentPt);
}
if (null == att)