diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index e22328dc66..b425d90976 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -137,11 +137,21 @@ namespace OpenSim.Server.Handlers.Grid } Dictionary rinfoData = new Dictionary(); - foreach (KeyValuePair kvp in request) - rinfoData[kvp.Key] = kvp.Value; - GridRegion rinfo = new GridRegion(rinfoData); + GridRegion rinfo = null; + try + { + foreach (KeyValuePair kvp in request) + rinfoData[kvp.Key] = kvp.Value; + rinfo = new GridRegion(rinfoData); + } + catch (Exception e) + { + m_log.DebugFormat("[GRID HANDLER]: exception unpacking region data: {0}", e); + } - bool result = m_GridService.RegisterRegion(scopeID, rinfo); + bool result = false; + if (rinfo != null) + m_GridService.RegisterRegion(scopeID, rinfo); if (result) return SuccessResult();