Potential Fix #1 for 0001392: Shift+Drag now causes an unhandled 'Object reference not set to an instance of object' exception

0.6.0-stable
mingchen 2008-06-07 17:48:45 +00:00
parent 990225a4ba
commit cde42cdbfd
2 changed files with 9 additions and 4 deletions

View File

@ -583,11 +583,17 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public void UpdateLandPrimCounts()
{
ResetAllLandPrimCounts();
foreach (EntityBase obj in m_scene.Entities.Values)
lock (m_scene.Entities)
{
if (obj is SceneObjectGroup)
foreach (EntityBase obj in m_scene.Entities.Values)
{
m_scene.EventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj);
if (obj != null)
{
if (obj is SceneObjectGroup)
{
m_scene.EventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj);
}
}
}
}
FinalizeLandPrimCountUpdate();

View File

@ -234,7 +234,6 @@ namespace OpenSim.Region.Environment.Scenes
{
if (Entities.ContainsKey(uuid))
{
Console.WriteLine("REMOVED " + ((SceneObjectGroup)Entities[uuid]).Children.Count + "!");
if (!resultOfObjectLinked)
{
m_numPrim -= ((SceneObjectGroup)Entities[uuid]).Children.Count;