fix the conditions to do parcel objects autoreturn

LSLKeyTest
UbitUmarov 2016-08-24 04:37:21 +01:00
parent c05ee23d3d
commit 8f509af1f4
1 changed files with 8 additions and 7 deletions

View File

@ -2244,10 +2244,10 @@ namespace OpenSim.Region.Framework.Scenes
// any exception propogate upwards. // any exception propogate upwards.
try try
{ {
if (!m_scene.ShuttingDown || // if shutting down then there will be nothing to handle the return so leave till next restart // if shutting down then there will be nothing to handle the return so leave till next restart
!m_scene.LoginsEnabled || // We're starting up or doing maintenance, don't mess with things if (!m_scene.ShuttingDown &&
m_scene.LoadingPrims) // Land may not be valid yet m_scene.LoginsEnabled && // We're starting up or doing maintenance, don't mess with things
!m_scene.LoadingPrims) // Land may not be valid yet
{ {
ILandObject parcel = m_scene.LandChannel.GetLandObject( ILandObject parcel = m_scene.LandChannel.GetLandObject(
m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y); m_rootPart.GroupPosition.X, m_rootPart.GroupPosition.Y);
@ -3402,10 +3402,11 @@ namespace OpenSim.Region.Framework.Scenes
public virtual void DetachFromBackup() public virtual void DetachFromBackup()
{ {
if (m_scene != null) if (m_scene != null)
{
m_scene.SceneGraph.FireDetachFromBackup(this); m_scene.SceneGraph.FireDetachFromBackup(this);
if (Backup && Scene != null) if (Backup)
m_scene.EventManager.OnBackup -= ProcessBackup; m_scene.EventManager.OnBackup -= ProcessBackup;
}
Backup = false; Backup = false;
} }