* Added a little more stability for getting the object list from the parcel box. (previously it crashed my simulator)
* Found and gracefully handled a few situations where null references occur. (m_rootPart again!)0.6.0-stable
parent
dc850df50a
commit
f82227a186
|
@ -762,13 +762,27 @@ namespace OpenSim.Region.Environment.Modules.LandManagement
|
||||||
// TODO: don't create new blocks if recycling an old packet
|
// TODO: don't create new blocks if recycling an old packet
|
||||||
|
|
||||||
foreach (SceneObjectGroup obj in primsOverMe)
|
foreach (SceneObjectGroup obj in primsOverMe)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (!ownersAndCount.ContainsKey(obj.OwnerID))
|
if (!ownersAndCount.ContainsKey(obj.OwnerID))
|
||||||
{
|
{
|
||||||
ownersAndCount.Add(obj.OwnerID, 0);
|
ownersAndCount.Add(obj.OwnerID, 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (NullReferenceException)
|
||||||
|
{
|
||||||
|
m_log.Info("[LAND]: " + "Got Null Reference when searching land owners from the parcel panel");
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
ownersAndCount[obj.OwnerID] += obj.PrimCount;
|
ownersAndCount[obj.OwnerID] += obj.PrimCount;
|
||||||
}
|
}
|
||||||
|
catch (KeyNotFoundException)
|
||||||
|
{
|
||||||
|
m_log.Error("[LAND]: Unable to match a prim with it's owner.");
|
||||||
|
}
|
||||||
|
}
|
||||||
if (ownersAndCount.Count > 0)
|
if (ownersAndCount.Count > 0)
|
||||||
{
|
{
|
||||||
ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[32];
|
ParcelObjectOwnersReplyPacket.DataBlock[] dataBlock = new ParcelObjectOwnersReplyPacket.DataBlock[32];
|
||||||
|
|
|
@ -161,7 +161,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public override uint LocalId
|
public override uint LocalId
|
||||||
{
|
{
|
||||||
get { return m_rootPart.LocalId; }
|
get {
|
||||||
|
if (m_rootPart == null)
|
||||||
|
{
|
||||||
|
m_log.Error("[PRIMGROUP]: Unable to find the rootpart for a LocalId Request!");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return m_rootPart.LocalId; }
|
||||||
set { m_rootPart.LocalId = value; }
|
set { m_rootPart.LocalId = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +180,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
public LLUUID OwnerID
|
public LLUUID OwnerID
|
||||||
{
|
{
|
||||||
get { return m_rootPart.OwnerID; }
|
get {
|
||||||
|
if (m_rootPart == null)
|
||||||
|
return LLUUID.Zero;
|
||||||
|
|
||||||
|
return m_rootPart.OwnerID;
|
||||||
|
}
|
||||||
set { m_rootPart.OwnerID = value; }
|
set { m_rootPart.OwnerID = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue