From 366de0a7b57919625429db571f4ed4a231f043da Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 13 Sep 2010 20:58:50 +0100 Subject: 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 --- OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index a3712d1..b7ecb55 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -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) -- cgit v1.1