diff options
author | Homer Horwitz | 2008-11-16 19:45:46 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-11-16 19:45:46 +0000 |
commit | e1ccbed982cd4500a8b04a5399ac0053d3c2cb47 (patch) | |
tree | da2c6c05f77a885938127e0dad3902af27ab77d2 | |
parent | Add MessageTransferModule interface to all scenes, not only the first (diff) | |
download | opensim-SC-e1ccbed982cd4500a8b04a5399ac0053d3c2cb47.zip opensim-SC-e1ccbed982cd4500a8b04a5399ac0053d3c2cb47.tar.gz opensim-SC-e1ccbed982cd4500a8b04a5399ac0053d3c2cb47.tar.bz2 opensim-SC-e1ccbed982cd4500a8b04a5399ac0053d3c2cb47.tar.xz |
GridIMs don't have a (sending) client, which led to a NRE on access.
Doesn't use client now in that case.
-rw-r--r-- | OpenSim/Framework/GridInstantMessage.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Framework/GridInstantMessage.cs b/OpenSim/Framework/GridInstantMessage.cs index 4ca4e67..9cecf42 100644 --- a/OpenSim/Framework/GridInstantMessage.cs +++ b/OpenSim/Framework/GridInstantMessage.cs | |||
@@ -75,9 +75,12 @@ namespace OpenSim.Framework | |||
75 | offline = 0; | 75 | offline = 0; |
76 | Position = _position; | 76 | Position = _position; |
77 | binaryBucket = _binaryBucket; | 77 | binaryBucket = _binaryBucket; |
78 | 78 | ||
79 | ParentEstateID = scene.RegionInfo.EstateSettings.ParentEstateID; | 79 | if (scene != null) |
80 | RegionID = scene.RegionInfo.RegionSettings.RegionUUID.Guid; | 80 | { |
81 | ParentEstateID = scene.RegionInfo.EstateSettings.ParentEstateID; | ||
82 | RegionID = scene.RegionInfo.RegionSettings.RegionUUID.Guid; | ||
83 | } | ||
81 | timestamp = (uint)Util.UnixTimeSinceEpoch(); | 84 | timestamp = (uint)Util.UnixTimeSinceEpoch(); |
82 | } | 85 | } |
83 | 86 | ||
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs index 1b7eb97..339f1f9 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs | |||
@@ -127,7 +127,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
127 | return; | 127 | return; |
128 | } | 128 | } |
129 | 129 | ||
130 | GridInstantMessage im = new GridInstantMessage(client.Scene, | 130 | IScene scene = client == null ? null : client.Scene; |
131 | GridInstantMessage im = new GridInstantMessage(scene, | ||
131 | fromAgentID, fromAgentName, fromAgentSession, toAgentID, | 132 | fromAgentID, fromAgentName, fromAgentSession, toAgentID, |
132 | dialog, fromGroup, message, imSessionID, | 133 | dialog, fromGroup, message, imSessionID, |
133 | offline != 0 ? true : false, Position, | 134 | offline != 0 ? true : false, Position, |