diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 19880dec20..e02ac7df2c 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -823,7 +823,7 @@ namespace OpenSim.Data.SQLite // Legacy entry point for when terrain was always a 256x256 hieghtmap public void StoreTerrain(double[,] ter, UUID regionID) { - StoreTerrain(new HeightmapTerrainData(ter), regionID); + StoreTerrain(new TerrainData(ter), regionID); } /// @@ -835,8 +835,7 @@ namespace OpenSim.Data.SQLite { lock (ds) { - using ( - SqliteCommand cmd = new SqliteCommand("delete from terrain where RegionUUID=:RegionUUID", m_conn)) + using (SqliteCommand cmd = new SqliteCommand("delete from terrain where RegionUUID=:RegionUUID", m_conn)) { cmd.Parameters.Add(new SqliteParameter(":RegionUUID", regionID.ToString())); cmd.ExecuteNonQuery(); @@ -1809,7 +1808,7 @@ namespace OpenSim.Data.SQLite } else { - prim.DynAttrs = new DAMap(); + prim.DynAttrs = null; } prim.PhysicsShapeType = Convert.ToByte(row["PhysicsShapeType"]); @@ -2247,7 +2246,7 @@ namespace OpenSim.Data.SQLite row["AttachedPosY"] = prim.AttachedPos.Y; row["AttachedPosZ"] = prim.AttachedPos.Z; - if (prim.DynAttrs.CountNamespaces > 0) + if (prim.DynAttrs!= null && prim.DynAttrs.CountNamespaces > 0) row["DynAttrs"] = prim.DynAttrs.ToXml(); else row["DynAttrs"] = null;