diff options
author | Geir Nøklebye | 2016-03-16 15:02:04 +0100 |
---|---|---|
committer | Kevin Cozens | 2016-04-25 12:01:36 -0400 |
commit | b91cfcca2b85f886793aad73a06c7319f19a52e9 (patch) | |
tree | 9d6871da2a1cdc1959ff6414538d0e645ca84b30 /OpenSim/Data/PGSQL/PGSQLSimulationData.cs | |
parent | Remove "f" (float) type markers that may have crept in through copypasta. (diff) | |
download | opensim-SC-b91cfcca2b85f886793aad73a06c7319f19a52e9.zip opensim-SC-b91cfcca2b85f886793aad73a06c7319f19a52e9.tar.gz opensim-SC-b91cfcca2b85f886793aad73a06c7319f19a52e9.tar.bz2 opensim-SC-b91cfcca2b85f886793aad73a06c7319f19a52e9.tar.xz |
POSTGRES: Added check for Heightfield not equal to Database NULL.. Mirrors OpenSim commit 50d738
Signed-off-by: Kevin Cozens <kevin@ve3syb.ca> (mantis #7845)
Diffstat (limited to '')
-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 | { |