diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 8ae24569db..53d1209c24 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -3355,7 +3355,15 @@ namespace OpenSim.Region.ScriptEngine.Common public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src) { m_host.AddScriptLPS(1); - return src.Length; + + if (src == null) + { + return 0; + } + else + { + return src.Length; + } } public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 3fbe257afc..8edd1692ce 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3299,7 +3299,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src) { m_host.AddScriptLPS(1); - return src.Length; + + if (src == null) + { + return 0; + } + else + { + return src.Length; + } } public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index)