In the osGetGrid functions, if the [GridInfo] section does not exist then return "Configuration Error", as already happens if there is no GridInfoURI

0.7.4.1
Justin Clark-Casey (justincc) 2012-06-13 04:05:02 +01:00
parent 66cb533f26
commit 1f34c8277d
1 changed files with 6 additions and 1 deletions

View File

@ -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!";