Mantis#1798. Thank you kindly, StrawberryFride for a patch that:

Fixes a couple of places where null reference exceptions were 
being caught and ignored rather than null checks being performed.
0.6.0-stable
Charles Krinke 2008-07-21 13:40:08 +00:00
parent 9dbb6f28bc
commit a432a07005
2 changed files with 5 additions and 13 deletions

View File

@ -95,22 +95,14 @@ namespace OpenSim.Region.Environment.Scenes
// If we're not doing the initial set
// Then we've got to remove the previous
// event handler
try
{
if (_PhyScene != null)
_PhyScene.OnPhysicsCrash -= physicsBasedCrash;
}
catch (NullReferenceException)
{
// This occurs when storing to _PhyScene the first time.
// Is there a better way to check the event handler before
// getting here
// This can be safely ignored. We're setting the first inital
// there are no event handler's registered.
}
_PhyScene = value;
_PhyScene.OnPhysicsCrash += physicsBasedCrash;
if (_PhyScene != null)
_PhyScene.OnPhysicsCrash += physicsBasedCrash;
}
}

View File

@ -153,7 +153,7 @@ namespace OpenSim.Region.Environment.Scenes
try
{
IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>();
statpack.Region.RegionFlags = estateModule.GetRegionFlags();
statpack.Region.RegionFlags = estateModule != null ? estateModule.GetRegionFlags() : (uint) 0;
}
catch (Exception)
{