From 1f34c8277d2584f0b43a43555f8b0abded4a1aa4 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 7ea8b7a4fb..7fa25f559e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -1965,7 +1965,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!";