aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteEstateData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteEstateData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs19
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index d1d67eb..63252aa 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -30,7 +30,11 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using Mono.Data.Sqlite; 33#if CSharpSqlite
34 using Community.CsharpSqlite.Sqlite;
35#else
36 using Mono.Data.Sqlite;
37#endif
34using OpenMetaverse; 38using OpenMetaverse;
35using OpenSim.Framework; 39using OpenSim.Framework;
36using OpenSim.Region.Framework.Interfaces; 40using OpenSim.Region.Framework.Interfaces;
@@ -105,10 +109,17 @@ namespace OpenSim.Data.SQLite
105 { 109 {
106 EstateSettings es = new EstateSettings(); 110 EstateSettings es = new EstateSettings();
107 es.OnSave += StoreEstateSettings; 111 es.OnSave += StoreEstateSettings;
112 IDataReader r = null;
113 try
114 {
115 r = cmd.ExecuteReader();
116 }
117 catch (SqliteException)
118 {
119 m_log.Error("[SQLITE]: There was an issue loading the estate settings. This can happen the first time running OpenSimulator with CSharpSqlite the first time. OpenSimulator will probably crash, restart it and it should be good to go.");
120 }
108 121
109 IDataReader r = cmd.ExecuteReader(); 122 if (r != null && r.Read())
110
111 if (r.Read())
112 { 123 {
113 foreach (string name in FieldList) 124 foreach (string name in FieldList)
114 { 125 {