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.3-extended
Justin Clark-Casey (justincc) 2012-06-13 04:05:02 +01:00
parent cb518ad68c
commit 00ac962db7
1 changed files with 6 additions and 1 deletions

View File

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