From 0d2e5827c514efe1df89872c465ca99ee8a1cee2 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Fri, 21 Nov 2008 22:21:49 +0000 Subject: - No need to build a list of regions and then only the first one. - I first did lock on m_scenes for that access, but as m_scenes (currently) is only changed in Initialise (and locked there), and PostInitialise is called after the calls to Initialise, there shouldn't be a need to lock here. - Trying out git-svn dcommit. Hope this works. --- OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 4cdff70..89c8587 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs @@ -133,8 +133,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends public void PostInitialise() { - List scenes = new List(m_scenes.Values); - m_TransferModule = scenes[0].RequestModuleInterface(); + if(m_scenes.Count > 0) + { + m_TransferModule = m_initialScene.RequestModuleInterface(); + } if (m_TransferModule == null) m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work"); } -- cgit v1.1