diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 20ab7d22f9..485903839e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -141,7 +141,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api internal ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow; internal float m_ScriptDelayFactor = 1.0f; internal float m_ScriptDistanceFactor = 1.0f; - internal bool m_debuggerSafe = false; + internal bool m_debuggerSafe = true; internal Dictionary m_FunctionPerms = new Dictionary(); protected IUrlModule m_UrlModule = null; protected ISoundModule m_SoundModule = null; @@ -158,7 +158,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if(m_osslconfig == null) m_osslconfig = m_ScriptEngine.Config; - m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false); + m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", m_debuggerSafe); m_UrlModule = m_ScriptEngine.World.RequestModuleInterface(); m_SoundModule = m_ScriptEngine.World.RequestModuleInterface(); @@ -2970,10 +2970,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (appearance == null) { - string appearanceSerialized = LoadNotecard(notecard); - - if (appearanceSerialized != null) + if(!string.IsNullOrWhiteSpace(notecard)) { + string appearanceSerialized = LoadNotecard(notecard); + if (appearanceSerialized == null) + { + OSSLError(string.Format("osNpcCreate: Notecard '{0}' not found.", notecard)); + return new LSL_Key(UUID.Zero.ToString()); + } + try { OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(appearanceSerialized); @@ -2982,14 +2987,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } catch { - OSSLError(string.Format("osNpcCreate: Error processing notcard '{0}'", notecard)); + OSSLError(string.Format("osNpcCreate: Error processing notecard '{0}'", notecard)); return new LSL_Key(UUID.Zero.ToString()); } } - else - { - OSSLError(string.Format("osNpcCreate: Notecard reference '{0}' not found.", notecard)); - } } UUID ownerID = UUID.Zero;