aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-07-12 21:33:27 +0100
committerJustin Clark-Casey (justincc)2010-07-26 23:34:20 +0100
commit43f480864bcca2990b809568eaed04bd27cecf60 (patch)
tree771a5ae747f5e5b61085747e03ebede078c9d62a /OpenSim/Data/SQLite
parentfactor out common code for updating the media url (diff)
downloadopensim-SC_OLD-43f480864bcca2990b809568eaed04bd27cecf60.zip
opensim-SC_OLD-43f480864bcca2990b809568eaed04bd27cecf60.tar.gz
opensim-SC_OLD-43f480864bcca2990b809568eaed04bd27cecf60.tar.bz2
opensim-SC_OLD-43f480864bcca2990b809568eaed04bd27cecf60.tar.xz
fix problem persisting when only one face had a media texture
Diffstat (limited to 'OpenSim/Data/SQLite')
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs10
1 files changed, 8 insertions, 2 deletions
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
1867 1867
1868 List<MediaEntry> mediaEntries = new List<MediaEntry>(); 1868 List<MediaEntry> mediaEntries = new List<MediaEntry>();
1869 foreach (OSD osdMe in osdMeArray) 1869 foreach (OSD osdMe in osdMeArray)
1870 mediaEntries.Add(MediaEntry.FromOSD(osdMe)); 1870 {
1871 MediaEntry me = (osdMe is OSDMap ? MediaEntry.FromOSD(osdMe) : new MediaEntry());
1872 mediaEntries.Add(me);
1873 }
1871 1874
1872 s.Media = mediaEntries; 1875 s.Media = mediaEntries;
1873 } 1876 }
@@ -1918,7 +1921,10 @@ namespace OpenSim.Data.SQLite
1918 1921
1919 OSDArray meArray = new OSDArray(); 1922 OSDArray meArray = new OSDArray();
1920 foreach (MediaEntry me in s.Media) 1923 foreach (MediaEntry me in s.Media)
1921 meArray.Add(me.GetOSD()); 1924 {
1925 OSD osd = (null == me ? new OSD() : me.GetOSD());
1926 meArray.Add(osd);
1927 }
1922 1928
1923 row["Media"] = OSDParser.SerializeLLSDXmlString(meArray); 1929 row["Media"] = OSDParser.SerializeLLSDXmlString(meArray);
1924 } 1930 }