From baa4e82107065c3bdf7954581362c3e631637b09 Mon Sep 17 00:00:00 2001 From: Dalien Talbot Date: Sun, 18 Nov 2007 05:28:28 +0000 Subject: [PATCH] Prevent the region crash in gridmode on bringing up the map --- .../Communications/OGS1/OGS1GridServices.cs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index c29dd41565..d355f92b03 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -266,10 +266,18 @@ namespace OpenSim.Region.Communications.OGS1 param["ymax"] = maxY; IList parameters = new ArrayList(); parameters.Add(param); - XmlRpcRequest req = new XmlRpcRequest("map_block", parameters); - XmlRpcResponse resp = req.Send(serversInfo.GridURL, 10000); - Hashtable respData = (Hashtable) resp.Value; - return respData; + try + { + XmlRpcRequest req = new XmlRpcRequest("map_block", parameters); + XmlRpcResponse resp = req.Send(serversInfo.GridURL, 10000); + Hashtable respData = (Hashtable) resp.Value; + return respData; + } + catch (Exception e) + { + MainLog.Instance.Error("MapBlockQuery XMLRPC failure: " + e.ToString()); + return new Hashtable(); + } } /// @@ -534,4 +542,4 @@ namespace OpenSim.Region.Communications.OGS1 #endregion } -} \ No newline at end of file +}