POSTGRES: Added check for Heightfield not equal to Database NULL.. Mirrors OpenSim commit 50d738
Signed-off-by: Kevin Cozens <kevin@ve3syb.ca> (mantis #7845)LSLKeyTest
parent
6f13d1e3df
commit
b91cfcca2b
|
@ -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,9 +554,12 @@ namespace OpenSim.Data.PGSQL
|
|||
if (reader.Read())
|
||||
{
|
||||
rev = Convert.ToInt32(reader["Revision"]);
|
||||
if ((reader["Heightfield"] != DBNull.Value))
|
||||
{
|
||||
byte[] blob = (byte[])reader["Heightfield"];
|
||||
terrData = TerrainData.CreateFromDatabaseBlobFactory(pSizeX, pSizeY, pSizeZ, rev, blob);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_Log.Info("[REGION DB]: No terrain found for region");
|
||||
|
|
Loading…
Reference in New Issue