Address symptom of Mantis 4588 (though not the cause) by moving the avatar dereference inside the exception catch

slimupdates2
Justin Clark-Casey (justincc) 2010-05-03 21:34:38 +01:00 committed by Justin Clark-Casey
parent 3d72a73b22
commit 98f2b798ff
1 changed files with 3 additions and 2 deletions

View File

@ -144,9 +144,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Combat.CombatModule
private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
{
ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
try
{
ILandObject obj = avatar.Scene.LandChannel.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0)
{
avatar.Invulnerable = false;