From 43f480864bcca2990b809568eaed04bd27cecf60 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 ++++++++-- OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | 7 +++++++ 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'OpenSim') 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); } diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 242ff6c..93a1ae8 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs @@ -212,6 +212,13 @@ namespace OpenSim.Region.CoreModules.Media.Moap } m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); + +// for (int i = 0; i < omu.FaceMedia.Length; i++) +// { +// MediaEntry me = omu.FaceMedia[i]; +// string v = (null == me ? "null": OSDParser.SerializeLLSDXmlString(me.GetOSD())); +// m_log.DebugFormat("[MOAP]: Face {0} [{1}]", i, v); +// } part.Shape.Media = new List(omu.FaceMedia); -- cgit v1.1