aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-07-12 21:33:27 +0100
committerJustin Clark-Casey (justincc)2010-07-12 21:33:27 +0100
commitd4684da8bd73ff088192da9f06657d32d6672342 (patch)
tree75313c897457840f8132814e63c1d66c19d302df /OpenSim/Data
parentfactor out common code for updating the media url (diff)
downloadopensim-SC_OLD-d4684da8bd73ff088192da9f06657d32d6672342.zip
opensim-SC_OLD-d4684da8bd73ff088192da9f06657d32d6672342.tar.gz
opensim-SC_OLD-d4684da8bd73ff088192da9f06657d32d6672342.tar.bz2
opensim-SC_OLD-d4684da8bd73ff088192da9f06657d32d6672342.tar.xz
fix problem persisting when only one face had a media texture
Diffstat (limited to 'OpenSim/Data')
-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 }