From 00ac962db7873ebaa396ea889ab949c87f1c1d31 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 13 Jun 2012 04:05:02 +0100 Subject: [PATCH] In the osGetGrid functions, if the [GridInfo] section does not exist then return "Configuration Error", as already happens if there is no GridInfoURI --- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index dfccf0051c..d168a636c1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1974,7 +1974,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { string retval = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; - string url = config.Configs["GridInfo"].GetString("GridInfoURI", String.Empty); + string url = null; + + IConfig gridInfoConfig = config.Configs["GridInfo"]; + + if (gridInfoConfig != null) + url = gridInfoConfig.GetString("GridInfoURI", String.Empty); if (String.IsNullOrEmpty(url)) return "Configuration Error!";