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.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-05-23 02:09:31 +01:00
parent ec8745cf51
commit 68918d632f

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>();
}