mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
POSTGRES: Added check for Heightfield not equal to Database NULL.. Mirrors OpenSim commit 50d738
Signed-off-by: Kevin Cozens <kevin@ve3syb.ca> (mantis #7845)
This commit is contained in:
committed by
Kevin Cozens
parent
6f13d1e3df
commit
b91cfcca2b
9
OpenSim/Data/PGSQL/PGSQLSimulationData.cs
Normal file → Executable file
9
OpenSim/Data/PGSQL/PGSQLSimulationData.cs
Normal file → Executable file
@@ -31,11 +31,13 @@ using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Data;
|
||||
using Npgsql;
|
||||
|
||||
namespace OpenSim.Data.PGSQL
|
||||
@@ -552,8 +554,11 @@ namespace OpenSim.Data.PGSQL
|
||||
if (reader.Read())
|
||||
{
|
||||
rev = Convert.ToInt32(reader["Revision"]);
|
||||
byte[] blob = (byte[])reader["Heightfield"];
|
||||
terrData = TerrainData.CreateFromDatabaseBlobFactory(pSizeX, pSizeY, pSizeZ, rev, blob);
|
||||
if ((reader["Heightfield"] != DBNull.Value))
|
||||
{
|
||||
byte[] blob = (byte[])reader["Heightfield"];
|
||||
terrData = TerrainData.CreateFromDatabaseBlobFactory(pSizeX, pSizeY, pSizeZ, rev, blob);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user