Fix a null ref on region crossing

slimupdates2
Melanie 2010-05-10 03:57:17 +01:00
parent bc6995f921
commit 89c762209c
1 changed files with 4 additions and 1 deletions

View File

@ -5596,7 +5596,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_String llGetLandOwnerAt(LSL_Vector pos) public LSL_String llGetLandOwnerAt(LSL_Vector pos)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
return World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.OwnerID.ToString(); ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
if (land == null)
return UUID.Zero.ToString();
return land.LandData.OwnerID.ToString();
} }
/// <summary> /// <summary>