aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
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 }