From f58a809536d318fbd788378c54776b053919ea14 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 19 Aug 2010 12:01:40 +0200 Subject: Skip conversion if fields that are null in the database. This may uncover errors elsewhere. --- OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index 6cbb2ee..7c23a47 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs @@ -148,6 +148,10 @@ namespace OpenSim.Data.MySQL foreach (string name in m_Fields.Keys) { + if (reader[name] is DBNull) + { + continue; + } if (m_Fields[name].FieldType == typeof(bool)) { int v = Convert.ToInt32(reader[name]); -- cgit v1.1