aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Data/MSSQL/MSSQLSimulationData.cs6
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs6
-rw-r--r--OpenSim/Data/Null/NullSimulationData.cs1
-rw-r--r--OpenSim/Data/PGSQL/PGSQLSimulationData.cs6
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs6
5 files changed, 21 insertions, 4 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;
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 42f2ebb..2921c1c 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -616,10 +616,14 @@ namespace OpenSim.Data.MySQL
616 // Legacy region loading 616 // Legacy region loading
617 public double[,] LoadTerrain(UUID regionID) 617 public double[,] LoadTerrain(UUID regionID)
618 { 618 {
619 double[,] ret = null;
619 TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight); 620 TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight);
620 return terrData.GetDoubles(); 621 if (terrData != null)
622 ret = terrData.GetDoubles();
623 return ret;
621 } 624 }
622 625
626 // Returns 'null' if region not found
623 public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) 627 public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
624 { 628 {
625 TerrainData terrData = null; 629 TerrainData terrData = null;
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs
index acde1a1..deeaced 100644
--- a/OpenSim/Data/Null/NullSimulationData.cs
+++ b/OpenSim/Data/Null/NullSimulationData.cs
@@ -148,6 +148,7 @@ namespace OpenSim.Data.Null
148 } 148 }
149 149
150 // Legacy. Just don't do this. 150 // Legacy. Just don't do this.
151 // Returns 'null' if region not found
151 public double[,] LoadTerrain(UUID regionID) 152 public double[,] LoadTerrain(UUID regionID)
152 { 153 {
153 if (m_terrains.ContainsKey(regionID)) 154 if (m_terrains.ContainsKey(regionID))
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
index 1505f87..77d87d4 100644
--- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
@@ -524,10 +524,14 @@ namespace OpenSim.Data.PGSQL
524 /// <returns></returns> 524 /// <returns></returns>
525 public double[,] LoadTerrain(UUID regionID) 525 public double[,] LoadTerrain(UUID regionID)
526 { 526 {
527 double[,] ret = null;
527 TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight); 528 TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight);
528 return terrData.GetDoubles(); 529 if (terrData != null)
530 ret = terrData.GetDoubles();
531 return ret;
529 } 532 }
530 533
534 // Returns 'null' if region not found
531 public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) 535 public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
532 { 536 {
533 TerrainData terrData = null; 537 TerrainData terrData = null;
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 5a34f09..9466e99 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -870,10 +870,14 @@ namespace OpenSim.Data.SQLite
870 /// <returns>Heightfield data</returns> 870 /// <returns>Heightfield data</returns>
871 public double[,] LoadTerrain(UUID regionID) 871 public double[,] LoadTerrain(UUID regionID)
872 { 872 {
873 double[,] ret = null;
873 TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight); 874 TerrainData terrData = LoadTerrain(regionID, (int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight);
874 return terrData.GetDoubles(); 875 if (terrData != null)
876 ret = terrData.GetDoubles();
877 return ret;
875 } 878 }
876 879
880 // Returns 'null' if region not found
877 public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) 881 public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ)
878 { 882 {
879 TerrainData terrData = null; 883 TerrainData terrData = null;