Permalink
Browse files

Fetch the dialog module reference in AttachmentsModule in RegionLoade…

…d() 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.
  • Loading branch information...
1 parent ed0878c commit dd05e960660be043304b7953586855965fae164e @justincc justincc committed May 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -71,7 +71,6 @@ public void Initialise(IConfigSource source)
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 @@ public void RemoveRegion(Scene scene)
public void RegionLoaded(Scene scene)
{
+ m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
m_invAccessModule = m_scene.RequestModuleInterface<IInventoryAccessModule>();
}

0 comments on commit dd05e96

Please sign in to comment.