- 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.
0.6.1-post-fixes
Homer Horwitz 2008-11-21 22:21:49 +00:00
parent ba723a4cf6
commit 0d2e5827c5
1 changed files with 4 additions and 2 deletions

View File

@ -133,8 +133,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
public void PostInitialise()
{
List<Scene> scenes = new List<Scene>(m_scenes.Values);
m_TransferModule = scenes[0].RequestModuleInterface<IMessageTransferModule>();
if(m_scenes.Count > 0)
{
m_TransferModule = m_initialScene.RequestModuleInterface<IMessageTransferModule>();
}
if (m_TransferModule == null)
m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work");
}