Fixed mysql not checking if the column data is not null.

This commit is contained in:
high 2011-08-05 01:30:46 -04:00
parent 4cf35a3093
commit ecb843ec5a

View file

@ -97,6 +97,9 @@ namespace TShockAPI.DB
public static T Get<T>(this IDataReader reader, int column)
{
if (reader.IsDBNull(column))
return default(T);
if (ReadFuncs.ContainsKey(typeof(T)))
return (T)ReadFuncs[typeof(T)](reader, column);