From 4e324ae3cbf5c4ce16900bd5e57d8671c1de0cfc Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 24 Aug 2010 19:07:42 +0200
Subject: Call the cleanup after saving attachment states, so that the
 attachments don't get killed before they can be saved

---
 OpenSim/Region/Framework/Scenes/Scene.cs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'OpenSim')

diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 6452dfe..37d797e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3199,7 +3199,6 @@ namespace OpenSim.Region.Framework.Scenes
                     m_log.Debug("[Scene] Beginning ClientClosed");
                     m_eventManager.TriggerClientClosed(agentID, this);
                     m_log.Debug("[Scene] Finished ClientClosed");
-                    CleanDroppedAttachments();
                 }
                 catch (NullReferenceException)
                 {
@@ -3210,6 +3209,9 @@ namespace OpenSim.Region.Framework.Scenes
                 m_log.Debug("[Scene] Beginning OnRemovePresence");
                 m_eventManager.TriggerOnRemovePresence(agentID);
                 m_log.Debug("[Scene] Finished OnRemovePresence");
+
+                CleanDroppedAttachments();
+
                 ForEachClient(
                     delegate(IClientAPI client)
                     {
-- 
cgit v1.1