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
parent
9dbb6f28bc
commit
a432a07005
|
@ -95,21 +95,13 @@ 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;
|
||||
|
||||
if (_PhyScene != null)
|
||||
_PhyScene.OnPhysicsCrash += physicsBasedCrash;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue