avoid null ref
parent
c0597e278b
commit
7098091616
|
@ -6548,7 +6548,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
LandData landData = lo.LandData;
|
||||
IPrimCounts pc = lo.PrimCounts;
|
||||
|
||||
StringBuilder sb = eq.StartEvent("ParcelProperties");
|
||||
int cap = 4 * landData.Bitmap.Length / 3 + 2048;
|
||||
StringBuilder sb = eq.StartEvent("ParcelProperties", cap);
|
||||
|
||||
LLSDxmlEncode.AddArrayAndMap("ParcelData", sb);
|
||||
|
||||
|
|
|
@ -6586,9 +6586,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (agent.IsChildAgent)
|
||||
if (agent.IsChildAgent || agent.IsDeleted)
|
||||
return 0; // Fail if they are not in the same region
|
||||
|
||||
try
|
||||
{
|
||||
// note: in OpenSim, sitting seems to cancel AGENT_ALWAYS_RUN, unlike SL
|
||||
if (agent.SetAlwaysRun)
|
||||
{
|
||||
|
@ -6671,6 +6673,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
{
|
||||
flags |= ScriptBaseClass.AGENT_MALE;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue