From b2870150281971ca020392a62ba6bdb441798cae Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 30 Nov 2007 21:01:03 +0000 Subject: [PATCH] * Fixed a bug in my 'user already logged in' fix that could cause a null reference exception. --- OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs index 3e3ab71c01..068ff4b46b 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs @@ -276,14 +276,16 @@ namespace OpenSim.Framework.Data.SQLite { // I just added this to help the standalone login situation. //It still needs to be looked at by a Database guy + DataTable ua = ds.Tables["useragents"]; + row = ua.Rows.Find(user.UUID); + if (row == null) { // do nothing } else { - DataTable ua = ds.Tables["useragents"]; - row = ua.Rows.Find(user.UUID); + row.Delete(); ua.AcceptChanges(); }