aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLSimulationData.cs')
-rwxr-xr-x[-rw-r--r--]OpenSim/Data/PGSQL/PGSQLSimulationData.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
index a006c58..960e7f6 100644..100755
--- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
@@ -31,11 +31,13 @@ using System.Data;
31using System.Drawing; 31using System.Drawing;
32using System.IO; 32using System.IO;
33using System.Reflection; 33using System.Reflection;
34using System.Threading;
34using log4net; 35using log4net;
35using OpenMetaverse; 36using OpenMetaverse;
36using OpenSim.Framework; 37using OpenSim.Framework;
37using OpenSim.Region.Framework.Interfaces; 38using OpenSim.Region.Framework.Interfaces;
38using OpenSim.Region.Framework.Scenes; 39using OpenSim.Region.Framework.Scenes;
40using OpenSim.Data;
39using Npgsql; 41using Npgsql;
40 42
41namespace OpenSim.Data.PGSQL 43namespace OpenSim.Data.PGSQL
@@ -552,8 +554,11 @@ namespace OpenSim.Data.PGSQL
552 if (reader.Read()) 554 if (reader.Read())
553 { 555 {
554 rev = Convert.ToInt32(reader["Revision"]); 556 rev = Convert.ToInt32(reader["Revision"]);
555 byte[] blob = (byte[])reader["Heightfield"]; 557 if ((reader["Heightfield"] != DBNull.Value))
556 terrData = TerrainData.CreateFromDatabaseBlobFactory(pSizeX, pSizeY, pSizeZ, rev, blob); 558 {
559 byte[] blob = (byte[])reader["Heightfield"];
560 terrData = TerrainData.CreateFromDatabaseBlobFactory(pSizeX, pSizeY, pSizeZ, rev, blob);
561 }
557 } 562 }
558 else 563 else
559 { 564 {