aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorUbitUmarov2016-09-21 15:26:30 +0100
committerUbitUmarov2016-09-21 15:26:30 +0100
commitdb1e75b0ac88bfb5f22c5742d7c0c5fdca5b064e (patch)
tree1d3bcd2deabe0bd28cce79bbae2a09e963efb397 /OpenSim/Services
parentMerge branch 'master' into httptests (diff)
parentavoid a null ref (diff)
downloadopensim-SC-db1e75b0ac88bfb5f22c5742d7c0c5fdca5b064e.zip
opensim-SC-db1e75b0ac88bfb5f22c5742d7c0c5fdca5b064e.tar.gz
opensim-SC-db1e75b0ac88bfb5f22c5742d7c0c5fdca5b064e.tar.bz2
opensim-SC-db1e75b0ac88bfb5f22c5742d7c0c5fdca5b064e.tar.xz
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Grid/GridServicesConnector.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
index 6c6ccf9..ceb2146 100644
--- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs
@@ -278,10 +278,12 @@ namespace OpenSim.Services.Connectors
278 278
279 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y) 279 public GridRegion GetRegionByPosition(UUID scopeID, int x, int y)
280 { 280 {
281 GridRegion rinfo = null;
281 ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y); 282 ulong regionHandle = Util.UIntsToLong((uint)x, (uint)y);
282 283
283 if (m_regionCache.Contains(regionHandle)) 284 // this cache includes NULL regions
284 return (GridRegion)m_regionCache[regionHandle]; 285 if (m_regionCache.TryGetValue(regionHandle, out rinfo))
286 return rinfo;
285 287
286 Dictionary<string, object> sendData = new Dictionary<string, object>(); 288 Dictionary<string, object> sendData = new Dictionary<string, object>();
287 289
@@ -304,7 +306,6 @@ namespace OpenSim.Services.Connectors
304 return null; 306 return null;
305 } 307 }
306 308
307 GridRegion rinfo = null;
308 if (reply != string.Empty) 309 if (reply != string.Empty)
309 { 310 {
310 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); 311 Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);