mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
Do a ScenePresence null check in HGMessageTransferModule.SendIMToScene() to stop a NullReferenceException being thrown if an HG IM is sent to a simulator running multiple regions
This is an attempt to address http://opensimulator.org/mantis/view.php?id=5791
This commit is contained in:
@@ -225,12 +225,13 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||
foreach (Scene scene in m_Scenes)
|
||||
{
|
||||
ScenePresence sp = scene.GetScenePresence(toAgentID);
|
||||
if(!sp.IsChildAgent)
|
||||
if(sp != null && !sp.IsChildAgent)
|
||||
{
|
||||
scene.EventManager.TriggerIncomingInstantMessage(gim);
|
||||
successful = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!successful)
|
||||
{
|
||||
// If the message can't be delivered to an agent, it
|
||||
|
||||
Reference in New Issue
Block a user