diff options
author | Melanie Thielker | 2010-08-19 12:01:40 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-08-19 12:01:40 +0200 |
commit | 0344395776c22cbef6392129cd11feaf34ad4218 (patch) | |
tree | e3f0452484c3426f783d2e92d7d3d56484d76073 /OpenSim/Data | |
parent | Prevent a bad cast in llCreateLink(). (diff) | |
download | opensim-SC_OLD-0344395776c22cbef6392129cd11feaf34ad4218.zip opensim-SC_OLD-0344395776c22cbef6392129cd11feaf34ad4218.tar.gz opensim-SC_OLD-0344395776c22cbef6392129cd11feaf34ad4218.tar.bz2 opensim-SC_OLD-0344395776c22cbef6392129cd11feaf34ad4218.tar.xz |
Skip conversion if fields that are null in the database. This may
uncover errors elsewhere.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | 4 |
1 files changed, 4 insertions, 0 deletions
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 | |||
148 | 148 | ||
149 | foreach (string name in m_Fields.Keys) | 149 | foreach (string name in m_Fields.Keys) |
150 | { | 150 | { |
151 | if (reader[name] is DBNull) | ||
152 | { | ||
153 | continue; | ||
154 | } | ||
151 | if (m_Fields[name].FieldType == typeof(bool)) | 155 | if (m_Fields[name].FieldType == typeof(bool)) |
152 | { | 156 | { |
153 | int v = Convert.ToInt32(reader[name]); | 157 | int v = Convert.ToInt32(reader[name]); |