GridIMs don't have a (sending) client, which led to a NRE on access.

Doesn't use client now in that case.
0.6.1-post-fixes
Homer Horwitz 2008-11-16 19:45:46 +00:00
parent 9e7d00c1e6
commit e1ccbed982
2 changed files with 8 additions and 4 deletions

View File

@ -76,8 +76,11 @@ namespace OpenSim.Framework
Position = _position;
binaryBucket = _binaryBucket;
if (scene != null)
{
ParentEstateID = scene.RegionInfo.EstateSettings.ParentEstateID;
RegionID = scene.RegionInfo.RegionSettings.RegionUUID.Guid;
}
timestamp = (uint)Util.UnixTimeSinceEpoch();
}

View File

@ -127,7 +127,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
return;
}
GridInstantMessage im = new GridInstantMessage(client.Scene,
IScene scene = client == null ? null : client.Scene;
GridInstantMessage im = new GridInstantMessage(scene,
fromAgentID, fromAgentName, fromAgentSession, toAgentID,
dialog, fromGroup, message, imSessionID,
offline != 0 ? true : false, Position,