From 9f129938c9c75bb4513b0b93248985100fe0e921 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Tue, 16 Jul 2013 17:43:36 -0700 Subject: Attachments module only registers when enabled. This enables alternative attachments module implementations. All calls to Scene.AttachmentsModule are checking for null. Ideally, if we support disabling attachments then we need a null attachments module to register with the scene. --- .../RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs') diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs index f424e7f..83732e2 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs @@ -51,7 +51,8 @@ namespace OpenSim.Region.RegionCombinerModule m_virtScene.UnSubscribeToClientPrimEvents(client); m_virtScene.UnSubscribeToClientPrimRezEvents(client); m_virtScene.UnSubscribeToClientInventoryEvents(client); - ((AttachmentsModule)m_virtScene.AttachmentsModule).UnsubscribeFromClientEvents(client); + if(m_virtScene.AttachmentsModule != null) + ((AttachmentsModule)m_virtScene.AttachmentsModule).UnsubscribeFromClientEvents(client); //m_virtScene.UnSubscribeToClientTeleportEvents(client); m_virtScene.UnSubscribeToClientScriptEvents(client); @@ -66,7 +67,8 @@ namespace OpenSim.Region.RegionCombinerModule client.OnRezObject += LocalRezObject; m_rootScene.SubscribeToClientInventoryEvents(client); - ((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client); + if (m_rootScene.AttachmentsModule != null) + ((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client); //m_rootScene.SubscribeToClientTeleportEvents(client); m_rootScene.SubscribeToClientScriptEvents(client); -- cgit v1.1