Fetch the dialog module reference in AttachmentsModule in RegionLoaded() not AddRegion()

The reference is not guaranteed to be there when AddRegion() is called but will definitely be present at RegionLoaded() if it's going to be present at all.
0.7.3-extended
Justin Clark-Casey (justincc) 2012-05-23 02:09:31 +01:00
parent ed0878ca23
commit dd05e96066
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
public void AddRegion(Scene scene)
{
m_scene = scene;
m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
if (Enabled)
@ -90,6 +89,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
public void RegionLoaded(Scene scene)
{
m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
m_invAccessModule = m_scene.RequestModuleInterface<IInventoryAccessModule>();
}