Related to #4689 - Adding missing null check for SceneObjectPart

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
This commit is contained in:
Makopoppo
2011-08-27 12:16:46 +09:00
committed by BlueWall
parent d4d894c20f
commit 795b56e695
2 changed files with 18 additions and 4 deletions

View File

@@ -1546,8 +1546,11 @@ namespace OpenSim.Region.Framework.Scenes
if (m_parentScene.Permissions.CanEditObject(group.UUID, remoteClient.AgentId))
{
SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
part.ClickAction = Convert.ToByte(clickAction);
group.HasGroupChanged = true;
if (part != null)
{
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))
{
SceneObjectPart part = m_parentScene.GetSceneObjectPart(primLocalID);
part.Material = Convert.ToByte(material);
group.HasGroupChanged = true;
if (part != null)
{
part.Material = Convert.ToByte(material);
group.HasGroupChanged = true;
}
}
}
}