mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 20:55:43 +08:00
avoid a null ref in lsl
This commit is contained in:
@@ -4184,14 +4184,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||||||
public LSL_Integer llStringLength(string str)
|
public LSL_Integer llStringLength(string str)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
if (str.Length > 0)
|
if(str == null || str.Length <= 0)
|
||||||
{
|
|
||||||
return str.Length;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
return str.Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llStartAnimation(string anim)
|
public void llStartAnimation(string anim)
|
||||||
|
|||||||
Reference in New Issue
Block a user