aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGeir Nøklebye2016-03-16 15:02:04 +0100
committerKevin Cozens2016-04-25 12:01:36 -0400
commitb91cfcca2b85f886793aad73a06c7319f19a52e9 (patch)
tree9d6871da2a1cdc1959ff6414538d0e645ca84b30
parentRemove "f" (float) type markers that may have crept in through copypasta. (diff)
downloadopensim-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)
-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 {