improve llOverMyLand() handling of potencial null refs. ty mrieker
parent
a48d65fd77
commit
76a82ba5de
|
@ -6895,6 +6895,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
m_host.AddScriptLPS(1);
|
||||
UUID key = new UUID();
|
||||
if (UUID.TryParse(id, out key))
|
||||
{
|
||||
try
|
||||
{
|
||||
ScenePresence presence = World.GetScenePresence(key);
|
||||
if (presence != null) // object is an avatar
|
||||
|
@ -6906,12 +6908,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
SceneObjectPart obj = World.GetSceneObjectPart(key);
|
||||
|
||||
if (obj != null)
|
||||
{
|
||||
if (m_host.OwnerID == World.LandChannel.GetLandObject(obj.AbsolutePosition).LandData.OwnerID)
|
||||
if (obj != null &&
|
||||
m_host.OwnerID == World.LandChannel.GetLandObject(obj.AbsolutePosition).LandData.OwnerID)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -14780,7 +14782,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return;
|
||||
}
|
||||
|
||||
string data = Encoding.UTF8.GetString(a.Data);
|
||||
//string data = Encoding.UTF8.GetString(a.Data);
|
||||
//m_log.Debug(data);
|
||||
NotecardCache.Cache(id, a.Data);
|
||||
AsyncCommands.DataserverPlugin.DataserverReply(
|
||||
|
|
Loading…
Reference in New Issue