aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 75b40af..fa762a6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6149,10 +6149,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6149 { 6149 {
6150 // This should only return a value if the avatar is in the same region, but eh. idc. 6150 // This should only return a value if the avatar is in the same region, but eh. idc.
6151 m_host.AddScriptLPS(1); 6151 m_host.AddScriptLPS(1);
6152 UUID key = new UUID(); 6152 if (World.AgentPreferencesService == null)
6153 if (UUID.TryParse(id, out key))
6154 { 6153 {
6155 return new LSL_String(World.AgentPreferencesService.GetLang(key)); 6154 Error("llGetAgentLanguage", "No AgentPreferencesService present");
6155 }
6156 else
6157 {
6158 UUID key = new UUID();
6159 if (UUID.TryParse(id, out key))
6160 {
6161 return new LSL_String(World.AgentPreferencesService.GetLang(key));
6162 }
6156 } 6163 }
6157 return new LSL_String("en-us"); 6164 return new LSL_String("en-us");
6158 } 6165 }