From: Kurt Taylor <krtaylor@us.ibm.com>
Attached is the second half of the fix for 821 - this is the null reference check for llDetectedName and the other *Detected* function.0.6.0-stable
parent
cbf9fcfac5
commit
f337cb205d
|
@ -434,12 +434,14 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID);
|
||||
if (SenseList != null)
|
||||
{
|
||||
if ((number >= 0) && (number <= SenseList.Length))
|
||||
{
|
||||
LLUUID SensedUUID = (LLUUID)SenseList.Data[number];
|
||||
return resolveName(SensedUUID);
|
||||
}
|
||||
else
|
||||
}
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
|
@ -479,6 +481,8 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
public EntityBase entityDetectedKey(int number)
|
||||
{
|
||||
LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID);
|
||||
if (SenseList != null)
|
||||
{
|
||||
if ((number >= 0) && (number < SenseList.Length))
|
||||
{
|
||||
LLUUID SensedUUID = (LLUUID)SenseList.Data[number];
|
||||
|
@ -489,6 +493,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
}
|
||||
return SensedObject;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue