From d4684da8bd73ff088192da9f06657d32d6672342 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 12 Jul 2010 21:33:27 +0100 Subject: fix problem persisting when only one face had a media texture --- OpenSim/Data/SQLite/SQLiteRegionData.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Data/SQLite/SQLiteRegionData.cs') diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index fc9667b..51f4cef 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs @@ -1867,7 +1867,10 @@ namespace OpenSim.Data.SQLite List mediaEntries = new List(); foreach (OSD osdMe in osdMeArray) - mediaEntries.Add(MediaEntry.FromOSD(osdMe)); + { + MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry()); + mediaEntries.Add(me); + } s.Media = mediaEntries; } @@ -1918,7 +1921,10 @@ namespace OpenSim.Data.SQLite OSDArray meArray = new OSDArray(); foreach (MediaEntry me in s.Media) - meArray.Add(me.GetOSD()); + { + OSD osd = (null == me ? new OSD() : me.GetOSD()); + meArray.Add(osd); + } row["Media"] = OSDParser.SerializeLLSDXmlString(meArray); } -- cgit v1.1