avoid a null ref

0.9.1.0-post-fixes
UbitUmarov 2019-09-03 02:22:08 +01:00
parent fd252b1285
commit 98b86c012e
1 changed files with 3 additions and 3 deletions

View File

@ -298,9 +298,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
List<GridRegion> grinfo = null; List<GridRegion> grinfo = null;
if (String.IsNullOrEmpty(regionName)) if (String.IsNullOrEmpty(regionName))
{ {
List<GridRegion> grinfos = m_RemoteGridService.GetDefaultRegions(UUID.Zero); List<GridRegion> grinfos = m_RemoteGridService.GetDefaultRegions(scopeID);
if (grinfos == null) if (grinfos == null || grinfos.Count == 0)
m_log.Warn("[REMOTE GRID CONNECTOR] returned null default regions"); m_log.Warn("[REMOTE GRID CONNECTOR] returned no default regions");
else else
{ {
m_log.WarnFormat("[REMOTE GRID CONNECTOR] returned default regions {0}, ...", grinfos[0].RegionName); m_log.WarnFormat("[REMOTE GRID CONNECTOR] returned default regions {0}, ...", grinfos[0].RegionName);