diff options
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLSimulationData.cs')
-rwxr-xr-x[-rw-r--r--] | OpenSim/Data/PGSQL/PGSQLSimulationData.cs | 9 |
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; | |||
31 | using System.Drawing; | 31 | using System.Drawing; |
32 | using System.IO; | 32 | using System.IO; |
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | using System.Threading; | ||
34 | using log4net; | 35 | using log4net; |
35 | using OpenMetaverse; | 36 | using OpenMetaverse; |
36 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
37 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Data; | ||
39 | using Npgsql; | 41 | using Npgsql; |
40 | 42 | ||
41 | namespace OpenSim.Data.PGSQL | 43 | namespace 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 | { |