Fixed nullrefs
parent
889ce36afa
commit
73c2162ff6
|
@ -266,25 +266,29 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||||
}
|
}
|
||||||
|
|
||||||
// m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType);
|
// m_log.DebugFormat("[CHAT] Broadcast: fromID {0} fromName {1}, cType {2}, sType {3}", fromID, fromName, cType, sourceType);
|
||||||
|
if (c.Scene != null)
|
||||||
((Scene)c.Scene).ForEachScenePresence(
|
{
|
||||||
delegate(ScenePresence presence)
|
((Scene)c.Scene).ForEachScenePresence
|
||||||
{
|
(
|
||||||
// ignore chat from child agents
|
delegate(ScenePresence presence)
|
||||||
if (presence.IsChildAgent) return;
|
{
|
||||||
|
// ignore chat from child agents
|
||||||
IClientAPI client = presence.ControllingClient;
|
if (presence.IsChildAgent) return;
|
||||||
|
|
||||||
// don't forward SayOwner chat from objects to
|
IClientAPI client = presence.ControllingClient;
|
||||||
// non-owner agents
|
|
||||||
if ((c.Type == ChatTypeEnum.Owner) &&
|
// don't forward SayOwner chat from objects to
|
||||||
(null != c.SenderObject) &&
|
// non-owner agents
|
||||||
(((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
|
if ((c.Type == ChatTypeEnum.Owner) &&
|
||||||
return;
|
(null != c.SenderObject) &&
|
||||||
|
(((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
|
||||||
client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID,
|
return;
|
||||||
(byte)sourceType, (byte)ChatAudibleLevel.Fully);
|
|
||||||
});
|
client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID,
|
||||||
|
(byte)sourceType, (byte)ChatAudibleLevel.Fully);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -840,8 +840,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID)
|
public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = GetSceneObjectPart(localID);
|
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||||
SceneObjectGroup group = part.ParentGroup;
|
SceneObjectGroup group = null;
|
||||||
if (group != null)
|
if (part != null)
|
||||||
|
{
|
||||||
|
group = part.ParentGroup;
|
||||||
|
}
|
||||||
|
if (part != null && group != null)
|
||||||
{
|
{
|
||||||
TaskInventoryItem item = group.GetInventoryItem(localID, itemID);
|
TaskInventoryItem item = group.GetInventoryItem(localID, itemID);
|
||||||
if (item == null)
|
if (item == null)
|
||||||
|
|
Loading…
Reference in New Issue