Related to #4689 - Adding missing null check for SceneObjectPart
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>bulletsim
parent
d4d894c20f
commit
795b56e695
|
@ -223,6 +223,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// Retrieve group
|
// Retrieve group
|
||||||
SceneObjectPart part = GetSceneObjectPart(primId);
|
SceneObjectPart part = GetSceneObjectPart(primId);
|
||||||
|
if (part == null)
|
||||||
|
return new ArrayList();
|
||||||
SceneObjectGroup group = part.ParentGroup;
|
SceneObjectGroup group = part.ParentGroup;
|
||||||
if (null == group)
|
if (null == group)
|
||||||
{
|
{
|
||||||
|
@ -967,6 +969,8 @@ 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);
|
||||||
|
if (part == null)
|
||||||
|
return;
|
||||||
SceneObjectGroup group = part.ParentGroup;
|
SceneObjectGroup group = part.ParentGroup;
|
||||||
if (group != null)
|
if (group != null)
|
||||||
{
|
{
|
||||||
|
@ -2028,6 +2032,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
foreach (uint localID in localIDs)
|
foreach (uint localID in localIDs)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = GetSceneObjectPart(localID);
|
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||||
|
if (part == null)
|
||||||
|
continue;
|
||||||
if (!groups.Contains(part.ParentGroup))
|
if (!groups.Contains(part.ParentGroup))
|
||||||
groups.Add(part.ParentGroup);
|
groups.Add(part.ParentGroup);
|
||||||
}
|
}
|
||||||
|
@ -2073,6 +2079,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
foreach (uint localID in localIDs)
|
foreach (uint localID in localIDs)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = GetSceneObjectPart(localID);
|
SceneObjectPart part = GetSceneObjectPart(localID);
|
||||||
|
if (part == null)
|
||||||
|
continue;
|
||||||
part.GetProperties(remoteClient);
|
part.GetProperties(remoteClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1546,8 +1546,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
||||||
{
|
{
|
||||||
SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
|
SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
|
||||||
part.ClickAction = Convert.ToByte(clickAction);
|
if (part != null)
|
||||||
group.HasGroupChanged = true;
|
{
|
||||||
|
part.ClickAction = Convert.ToByte(clickAction);
|
||||||
|
group.HasGroupChanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1560,8 +1563,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
|
||||||
{
|
{
|
||||||
SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
|
SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
|
||||||
part.Material = Convert.ToByte(material);
|
if (part != null)
|
||||||
group.HasGroupChanged = true;
|
{
|
||||||
|
part.Material = Convert.ToByte(material);
|
||||||
|
group.HasGroupChanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue