aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL
diff options
context:
space:
mode:
authorRobert Adams2014-01-28 15:29:06 -0800
committerRobert Adams2014-01-28 15:29:06 -0800
commite5d59dc696e647624047465e0e718f2c65106b3c (patch)
tree770acd7476569391902665c332ad7679f821a3b7 /OpenSim/Data/MSSQL
parentMerge branch 'master' into varregion (diff)
downloadopensim-SC_OLD-e5d59dc696e647624047465e0e718f2c65106b3c.zip
opensim-SC_OLD-e5d59dc696e647624047465e0e718f2c65106b3c.tar.gz
opensim-SC_OLD-e5d59dc696e647624047465e0e718f2c65106b3c.tar.bz2
opensim-SC_OLD-e5d59dc696e647624047465e0e718f2c65106b3c.tar.xz
Repair database routines so they properly return null when asked for
the heighmap of a region that does not exist.
Diffstat (limited to 'OpenSim/Data/MSSQL')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLSimulationData.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
index 9f5991b..1a5ecd6 100644
--- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
@@ -531,10 +531,14 @@ ELSE
531 /// <returns></returns> 531 /// <returns></returns>
532 public double[,] LoadTerrain(UUID regionID) 532 public double[,] LoadTerrain(UUID regionID)
533 { 533 {
534 double[,] ret = null;
534 TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight); 535 TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight);
535 return terrData.GetDoubles(); 536 if (terrData != null)
537 ret = terrData.GetDoubles();
538 return ret;
536 } 539 }
537 540
541 // Returns 'null' if region not found
538 public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) 542 public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
539 { 543 {
540 TerrainData terrData = null; 544 TerrainData terrData = null;